web-services

Changing the default XML namespace prefix generated with JAXWS

Deadly 提交于 2020-01-08 21:39:46
问题 I am using JAXWS to generate a WebService client for a Java Application we're building. When JAXWS build its XMLs to use in SOAP protocol, it generates the following namespace prefix: <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Body ...> <!-- body goes here --> </env:Body> </env:Envelope> My problem is that my Counterpart (a big money transfer company) which manages the server my client is connecting to, refuses to accept the WebService call ( please don't ask my

Convert BufferedInputStream into image [duplicate]

蓝咒 提交于 2020-01-08 16:59:28
问题 This question already has an answer here : ImageIO.read returns null on byte array (1 answer) Closed 6 years ago . Im having trouble turning my blob into a buffered image so I can use it. I'm getting a blob (jpg image) back from my database I uploaded using inputstream. In my database it is stored as BufferedInputStream I notice. I get the blob just fine, its a bunch of weird symbols and says its a jpg so the image has to be fine. Can anyone spot what I'm doing wrong? Maybe im converting it

C# client - php web server - couchbase db - how to pass data between them? [closed]

只谈情不闲聊 提交于 2020-01-07 08:00:22
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I am trying to understand the basic flow of a system consisting of: C# client/program/app which will query the PHP server. PHP server. Couchbase server running on Linux . On the client side I have some classes,

How to use wse-php library to connect to secured webservices via SOAP

a 夏天 提交于 2020-01-07 07:42:13
问题 I have a script that is supposed to connect to webservice using WS-Security. Currently - in my script, I built a soap XML and sent it to the webservice endpoint but I'm getting an xml response saying "Client Internal Error". Here's the code that I'm using: <?php function sendXMLRequest($url, $params) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/soap+xml")); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch,

I can't to return json objects using Axis2

筅森魡賤 提交于 2020-01-07 07:41:09
问题 I can't to return json objects using Axis2 like web service. I added the lines of builder and messageFormatter in my web2.xml for the support json but always that access my web service to test return in xml. I use the url to test my action: http://server.com:8080/webservice/services/classe/action?response=application/json but no success. Any idea? Thank you 回答1: Solve your problem exporting the wso2dynamic response (wso2dynamic-response-1.5.jar and wso2dynamic-response.mar) to modules folder

Any way to return a ResultSet in Java?

时光怂恿深爱的人放手 提交于 2020-01-07 07:27:10
问题 I found out that Java doesn't let ResultSet to be return as a data type. And would like to ask whether is there any better solution to return results after executing query? try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/shopping mall?zeroDateTimeBehavior=convertToNull", "root", "" ); java.sql.Statement stmt = con.createStatement() ; String query = "SELECT * FROM shops WHERE SHOPNAME LIKE \'%" + shopName + "%\' ORDER BY

Public api to manage documents in Office Web apps

旧巷老猫 提交于 2020-01-07 07:16:09
问题 Is there any API or webservices that allows us to manage online Office web apps documents (on sky drive)? What I would like to do is to use this API (or webservice) in order to create some reports in excel format without the need to use the HTML table trick, neither to have the Excel Com components installed on my server. 回答1: Nope, there is no such API currently. You could however use the OpenXML SDK, which provides a rich object model on top of System.IO.Packaging and allows generation and

WCF client unit test/integration test

本秂侑毒 提交于 2020-01-07 06:44:11
问题 I generated a proxy client to a SOAP web service. I would like to test the request envelop without actually calling the service at the other end (actual endpoint) for now, i wrap my tests in try/catch block as It will timeout. is they a way fake the endpoint as I'm only testing the request body? 回答1: Use New MockService option from within SoapUI. Here are detailed steps: Create a new SoapUI project As a Initial WSDL provide url of you local service (with ?wsdl added) or WSDL of external

Can I (DNS) map one subdomain to multiple Play Framework entry points

為{幸葍}努か 提交于 2020-01-07 05:08:20
问题 Is the scenario below possible? A warning that I understand DNS only in its basic form. We have an API (built using Play) that we would like to make available via a an address say http://api.publicname.com However, we would like to split this API in 2 Play projects (e.g. myapione and myapitwo). Then access them using only 1 domain but two separate "subfolders" So I have been looking for the possibility of mapping say... http://myinternal.domain:9000 to http://api.publicname.com/myapione ...

Webservice timeout java web service

泪湿孤枕 提交于 2020-01-07 04:45:45
问题 I have a webservice stub. I am setting the timeout for the stub like this. stub. getServiceClient().getOptions().setTimeOutInMilliSeconds(timeout * 1 * 1000); But this doesnt work (i.e. the connection is alive even after the timeout period). Can you please tell me why is it so? Thanks in advance. :) 回答1: We implement the timeout for our webservice clients as follows org.apache.axis2.client.Options options = stub._getServiceClient().getOptions(); options.setTimeOutInMilliSeconds