Unable to sendViaPost to url
Hello All, I am having problem with web service. This was working ok till yeasterday and I am getting this error today. Some java classes changed but no service classes are modified. I am using Axis2 1.3, Eclipse, Tomcat. If I try to use service using url on browser it works - only the call by code doesnt, Please help. I tried things like comparing files from latest project code to the one last checked in, googled, reinstalled tomcat.. 2008-02-12 17:37:40,175 [INFO] org.apache.axis2.transport.http.HTTPSender - Unable to sendViaPost to url[http://localhost:8080/RTB/services/RTBprovisioning] org.apache.axis2.AxisFault: Transport error: 404 Error: Not found at org.apache.axis2.transport.http.HTTPSender.handleResponse( HTTPSender.java:298 ) at org.apache.axis2.transport.http.HTTPSender.sendViaPost( HTTPSender.java:192 ) at org.apache.axis2.transport.http.HTTPSender.send( HTTPSender.java:77 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons( CommonsHTTPTransportSender.java:327 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke( CommonsHTTPTransportSender.java:206 ) at org.apache.axis2.engine.AxisEngine.send( AxisEngine.java:396 ) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:374 ) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( OutInAxisOperation.java:211 ) at org.apache.axis2.client.OperationClient.execute( OperationClient.java:163 ) at com.didata.rtb.provisioning.service.RTBprovisioningStub.Ping( RTBprovisioningStub.java:2853 ) at com.didata.rtb.admin.RTBAdminRunner.testProvisioningSrvc( RTBAdminRunner.java:137 ) at com.didata.rtb.admin.RTBAdminRunner.run( RTBAdminRunner.java:80 ) at java.lang.Thread.run( Thread.java:595 ) HTTPSender.java:298 ) at org.apache.axis2.transport.http.HTTPSender.sendViaPost( HTTPSender.java:192 ) at org.apache.axis2.transport.http.HTTPSender.send( HTTPSender.java:77 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons( CommonsHTTPTransportSender.java:327 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke( CommonsHTTPTransportSender.java:206 ) at org.apache.axis2.engine.AxisEngine.send( AxisEngine.java:396 ) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:374 ) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( OutInAxisOperation.java:211 ) at org.apache.axis2.client.OperationClient.execute( OperationClient.java:163 ) at com.didata.rtb.provisioning.service.RTBprovisioningStub.Ping( RTBprovisioningStub.java:2853 ) at com.didata.rtb.admin.RTBAdminRunner.testProvisioningSrvc( RTBAdminRunner.java:137 ) at com.didata.rtb.admin.RTBAdminRunner.run( RTBAdminRunner.java:80 ) at java.lang.Thread.run( Thread.java:595 ) HTTPSender.java:192 ) at org.apache.axis2.transport.http.HTTPSender.send( HTTPSender.java:77 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons( CommonsHTTPTransportSender.java:327 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke( CommonsHTTPTransportSender.java:206 ) at org.apache.axis2.engine.AxisEngine.send( AxisEngine.java:396 ) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:374 ) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( OutInAxisOperation.java:211 ) at org.apache.axis2.client.OperationClient.execute( OperationClient.java:163 ) at com.didata.rtb.provisioning.service.RTBprovisioningStub.Ping( RTBprovisioningStub.java:2853 ) at com.didata.rtb.admin.RTBAdminRunner.testProvisioningSrvc( RTBAdminRunner.java:137 ) at com.didata.rtb.admin.RTBAdminRunner.run( RTBAdminRunner.java:80 ) at java.lang.Thread.run( Thread.java:595 ) HTTPSender.java:77 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons( CommonsHTTPTransportSender.java:327 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke( CommonsHTTPTransportSender.java:206 ) at org.apache.axis2.engine.AxisEngine.send( AxisEngine.java:396 ) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:374 ) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( OutInAxisOperation.java:211 ) at org.apache.axis2.client.OperationClient.execute( OperationClient.java:163 ) at com.didata.rtb.provisioning.service.RTBprovisioningStub.Ping( RTBprovisioningStub.java:2853 ) at com.didata.rtb.admin.RTBAdminRunner.testProvisioningSrvc( RTBAdminRunner.java:137 ) at com.didata.rtb.admin.RTBAdminRunner.run( RTBAdminRunner.java:80 ) at java.lang.Thread.run( Thread.java:595 ) CommonsHTTPTransportSender.java:327 ) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke( CommonsHTTPTransportSender.java:206 ) at org.apache.axis2.engine.AxisEngine.s
Re: [AXIS 2] SSL Error :Unconnected sockets not implemented
Martin, thanks its working now. The issue was as I am testing I am using same file keystore and trust store (selfsigned) for client and server. For keystore as we know if file name/path not specified it looks up in the user's home directory. I thought same should be for truststore. But when I explicitly provided javax.net.ssl.trustStore with absolute path of SAME file it worked. I am not sure why it failed before. Regards, Srikanth - Original Message - From: "Martin Gainty" <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Friday, 14 December 2007 01:54:00 PM (GMT+1000) Australia/Sydney Subject: Re: [AXIS 2] SSL Error :Unconnected sockets not implemented is trustStore set to the store location e.g. System.setProperty("javax.net.ssl.trustStore", "${AXIS_HOME}/src/java/modules/integration/test-resources/rampart/store.jks"); is EPR should be set to SSL connection? options.setTo(new EndpointReference(" https://www-lk.wso2.com:8443/axis2/services/UTSAMLHoK ")); M- ----- Original Message - From: Srikanth Muthyala To: axis-user@ws.apache.org Sent: Thursday, December 13, 2007 9:12 PM Subject: [AXIS 2] SSL Error :Unconnected sockets not implemented Hello All, I am implementing Https to connect to service on tomcat. It works fine with Http. I made changes to tomcat to accept https port 8443. When I am using client stub I am setting below properties. System. setProperty ( "javax.net.ssl.keyStoreType" , "JKS" ); System. setProperty ( "javax.net.ssl.keyStorePassword" , "kspass" ); System. setProperty ( "javax.net.ssl.trustStorePassword" , "kspass" ); When service invoked I get java .net.SocketException : Unconnected sockets not implemented When I googled I found page http://wiki.petals.objectweb.org/xwiki/bin/view/Components.Binding/Axis2BCUserguide saying this is a known bug. Has anybody got a workaround for this??? Any solutions?? Regards, Srikanth
[AXIS 2] SSL Error :Unconnected sockets not implemented
Hello All, I am implementing Https to connect to service on tomcat. It works fine with Http. I made changes to tomcat to accept https port 8443. When I am using client stub I am setting below properties. System. setProperty ( "javax.net.ssl.keyStoreType" , "JKS" ); System. setProperty ( "javax.net.ssl.keyStorePassword" , "kspass" ); System. setProperty ( "javax.net.ssl.trustStorePassword" , "kspass" ); When service invoked I get java .net.SocketException : Unconnected sockets not implemented When I googled I found page http://wiki.petals.objectweb.org/xwiki/bin/view/Components.Binding/Axis2BCUserguide saying this is a known bug. Has anybody got a workaround for this??? Any solutions?? Regards, Srikanth
[Axis2] SOAP with HTTPS
Hi, Part of project I am working on is to transmit some information using soap to the service running elsewhere. My app will be a client to this service. Currently its working fine using http. Next task is to do the same over https. We will be provided with customer's digital certificates. I am new this SSL. Can somebody guide me through the steps I need to take to communicate over https and also recommend any additional packages required. My app (client) will be running on Tomcat using java 1.5 and Axis2. Regards, Srikanth
Re: Axis 2 client part of web app
Hey Keith, I fixed it. It was my services,xml - defining actionMapping as >/"/"< , I changed it to >""< and it worked. Thanks a lot for your help. Regards, Srikanth Muthyala - Original Message - From: "Srikanth Muthyala" <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Cc: [EMAIL PROTECTED] Sent: Monday, 15 October 2007 09:54:36 PM (GMT+1000) Australia/Sydney Subject: Re: Axis 2 client part of web app Hi keith, I have tried stub._serviceClient.getOptions().setAction(""); but didnt help. Here is the wsdl. - < definitions name =" rtbCallEvent " targetNamespace =" urn:rtbCallEvent/wsdl " xmlns:tns =" urn:rtbCallEvent/wsdl " xmlns:xsd =" http://www.w3.org/2001/XMLSchema " xmlns:ns2 =" urn:rtbCallEvent/types " xmlns:soap =" http://schemas.xmlsoap.org/wsdl/soap/ " xmlns =" http://schemas.xmlsoap.org/wsdl/ " > - < types > - < schema targetNamespace =" urn:rtbCallEvent/types " xmlns =" http://www.w3.org/2001/XMLSchema " xmlns:soap11-enc =" http://schemas.xmlsoap.org/soap/encoding/ " xmlns:tnsT =" urn:rtbCallEvent/types " xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/ " xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance " > - < complexType name =" callEvent " > - < sequence > < element name =" recordId " nillable =" false " type =" string " /> < element name =" direction " nillable =" false " type =" string " /> < element name =" callingNumber " nillable =" false " type =" string " /> < element name =" calledNumber " nillable =" false " type =" string " /> < element name =" answerTime " nillable =" false " type =" string " /> < element name =" releaseTime " nillable =" false " type =" string " /> < element name =" group " nillable =" false " type =" string " /> - < complexType name =" callEventResponse " > - < sequence > < element name =" result " type =" boolean " /> < element name =" callEvent " type =" tnsT:callEvent " /> < element name =" callEventResponse " type =" tnsT:callEventResponse " /> - < message name =" rtbCallEventSEI_callEvent " > < part name =" parameters " element =" ns2:callEvent " /> - < message name =" rtbCallEventSEI_callEventResponse " > < part name =" result " element =" ns2:callEventResponse " /> - < portType name =" rtbCallEventSEI " > - < operation name =" callEvent " > < input message =" tns:rtbCallEventSEI_callEvent " /> < output message =" tns:rtbCallEventSEI_callEventResponse " /> - < binding name =" rtbCallEventSEIBinding " type =" tns:rtbCallEventSEI " > < soap:binding style =" document " transport =" http://schemas.xmlsoap.org/soap/http " /> - < operation name =" callEvent " > < soap:operation soapAction =" " /> - < input > < soap:body use =" literal " /> - < output > < soap:body use =" literal " /> - < service name =" RtbCallEvent " > - < port name =" rtbCallEventSEIPort " binding =" tns:rtbCallEventSEIBinding " > < soap:address location =" http://10.0.0.66:/RTBCustomer/services/RtbCallEvent " /> Regards, Srikanth Muthyala Snr Consultant Innovative IT Consultants Mobile: +61 401 544 199 Email:[EMAIL PROTECTED] www.iitc.com.au - Original Message - From: "keith chapman" <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Monday, 15 October 2007 06:22:05 PM (GMT+1000) Australia/Sydney Subject: Re: Axis 2 client part of web app Hi Srikanth, When your using the webapp is looks like addressing is engaged. As a workaround just set this option on the client stub._serviceClient.getOptions().setAction(""); As a better solluion can you send me the interface operation section of your ?wsdl2. Or the whole wsdl. Looks like there is a mismatch in the addreassing header in the client and the server. Thanks, Keith.
Re: Axis 2 client part of web app
Hi keith, I have tried stub._serviceClient.getOptions().setAction(""); but didnt help. Here is the wsdl. - < definitions name =" rtbCallEvent " targetNamespace =" urn:rtbCallEvent/wsdl " xmlns:tns =" urn:rtbCallEvent/wsdl " xmlns:xsd =" http://www.w3.org/2001/XMLSchema " xmlns:ns2 =" urn:rtbCallEvent/types " xmlns:soap =" http://schemas.xmlsoap.org/wsdl/soap/ " xmlns =" http://schemas.xmlsoap.org/wsdl/ " > - < types > - < schema targetNamespace =" urn:rtbCallEvent/types " xmlns =" http://www.w3.org/2001/XMLSchema " xmlns:soap11-enc =" http://schemas.xmlsoap.org/soap/encoding/ " xmlns:tnsT =" urn:rtbCallEvent/types " xmlns:wsdl =" http://schemas.xmlsoap.org/wsdl/ " xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance " > - < complexType name =" callEvent " > - < sequence > < element name =" recordId " nillable =" false " type =" string " /> < element name =" direction " nillable =" false " type =" string " /> < element name =" callingNumber " nillable =" false " type =" string " /> < element name =" calledNumber " nillable =" false " type =" string " /> < element name =" answerTime " nillable =" false " type =" string " /> < element name =" releaseTime " nillable =" false " type =" string " /> < element name =" group " nillable =" false " type =" string " /> - < complexType name =" callEventResponse " > - < sequence > < element name =" result " type =" boolean " /> < element name =" callEvent " type =" tnsT:callEvent " /> < element name =" callEventResponse " type =" tnsT:callEventResponse " /> - < message name =" rtbCallEventSEI_callEvent " > < part name =" parameters " element =" ns2:callEvent " /> - < message name =" rtbCallEventSEI_callEventResponse " > < part name =" result " element =" ns2:callEventResponse " /> - < portType name =" rtbCallEventSEI " > - < operation name =" callEvent " > < input message =" tns:rtbCallEventSEI_callEvent " /> < output message =" tns:rtbCallEventSEI_callEventResponse " /> - < binding name =" rtbCallEventSEIBinding " type =" tns:rtbCallEventSEI " > < soap:binding style =" document " transport =" http://schemas.xmlsoap.org/soap/http " /> - < operation name =" callEvent " > < soap:operation soapAction =" " /> - < input > < soap:body use =" literal " /> - < output > < soap:body use =" literal " /> - < service name =" RtbCallEvent " > - < port name =" rtbCallEventSEIPort " binding =" tns:rtbCallEventSEIBinding " > < soap:address location =" http://10.0.0.66:/RTBCustomer/services/RtbCallEvent " /> Regards, Srikanth Muthyala Snr Consultant Innovative IT Consultants Mobile: +61 401 544 199 Email:[EMAIL PROTECTED] www.iitc.com.au - Original Message - From: "keith chapman" <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Monday, 15 October 2007 06:22:05 PM (GMT+1000) Australia/Sydney Subject: Re: Axis 2 client part of web app Hi Srikanth, When your using the webapp is looks like addressing is engaged. As a workaround just set this option on the client stub._serviceClient.getOptions().setAction(""); As a better solluion can you send me the interface operation section of your ?wsdl2. Or the whole wsdl. Looks like there is a mismatch in the addreassing header in the client and the server. Thanks, Keith.
Re: Axis 2 client part of web app
Hi Keith, Thanks for your tip to use TCP Monitor. I ran the client using both main method and web app. The difference I noticed in request was the header (see below) - other remains the same. http://schemas.xmlsoap.org/soap/envelope/ " xmlns:wsa=" http://www.w3.org/2005/08/addressing";> http://localhost:8080/RTBCustomer/services/RtbCallEvent urn:uuid:CEE8CBBEB2653D48CD1192428093191 "" Again looking at the fault Faultcode = { http://www.w3.org/2005/08/addressing }ActionNotSupported Reason = The server did not recognise the action which it received: ...makes it obvious the header is the culprit. How do I fix this?? FYI, I included req/response messages below. Regards, Srikanth Muthyala Main Method request POST /RTBCustomer/services/RtbCallEvent HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: "" User-Agent: Axis2 Host: 127.0.0.1:8080 Transfer-Encoding: chunked 1b1 http://schemas.xmlsoap.org/soap/envelope/";>sdfsdsdfsdfdsparamparamsdfsuccessq 0 Main Method response HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Mon, 15 Oct 2007 06:00:54 GMT 109 http://schemas.xmlsoap.org/soap/envelope/";>true 0 Web app request POST /RTBCustomer/services/RtbCallEvent HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: "" User-Agent: Axis2 Host: 127.0.0.1:8080 Transfer-Encoding: chunked 2ef http://schemas.xmlsoap.org/soap/envelope/ " xmlns:wsa=" http://www.w3.org/2005/08/addressing";>http://localhost:8080/RTBCustomer/services/RtbCallEventurn:uuid:CEE8CBBEB2653D48CD1192428093191""30779377474759249921344.5360+10Originating+61396261104962611002007092501200920070925012015group1 0 Web app response HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Mon, 15 Oct 2007 06:17:45 GMT Connection: close 285 http://schemas.xmlsoap.org/soap/envelope/ " xmlns:wsa=" http://www.w3.org/2005/08/addressing";>http://www.w3.org/2005/08/addressing/faulturn:uuid:CEE8CBBEB2653D48CD1192428093191""wsa:ActionNotSupportedThe [action] cannot be processed at the receiver. 0 - Original Message - From: "keith chapman" <[EMAIL PROTECTED]> To: axis-user@ws.apache.org Sent: Monday, 15 October 2007 02:14:19 PM (GMT+1000) Australia/Sydney Subject: Re: Axis 2 client part of web app Hi Srikanth, Can you use TCP-Monitor (U can use the eclipse plugin) and capture the request and responses in the two cases and post it here. That'll help diagnose the problem. Thanks, Keith. On 10/15/07, Srikanth Muthyala < [EMAIL PROTECTED] > wrote: I have a client code generated using Axiscode generator in eclipse. If I make a call to the service when client is running as a standalone main method it works fine but when the same code is called while running in web app it gets fault Faultcode = { http://www.w3.org/2005/08/addressing }ActionNotSupported Reason = The server did not recognise the action which it received: -I tried running cient and server on two different hosts and same host - no change. This is my services.xml http://www.w3.org/ns/wsdl/in-out " class="com.customer.service.rtbcallevent.RtbCallEventMessageReceiverInOut"/> com.customer.service.rtbcallevent.RtbCallEventSkeleton true true http://www.w3.org/ns/wsdl/in-out "> \"\" urn:rtbCallEvent/wsdl:rtbCallEventSEI:callEventResponse This is my java code RtbCallEventStub stub = new RtbCallEventStub(" http://10.96.201.30:8080/RTB/services/RtbCallEvent "); CallEvent7 callEvent = new CallEvent7(); CallEvent param = new CallEvent(); param.setAnswerTime("param"); param.setCalledNumber("param"); param.setCallingNumber("sdfds"); param.setDirection("sdf"); param.setGroup("successq"); param.setRecordId("sdfsd"); param.setReleaseTime("sdf"); callEvent.setCallEvent(param ); CallEventResponse6 resp = stub.callEvent(callEvent); System.out.println(resp.getCallEventResponse().getResult()); } catch (AxisFault e) { // TODO Auto-generated catch block System.out.println(e.getFaultCode());
Axis 2 client part of web app
I have a client code generated using Axiscode generator in eclipse. If I make a call to the service when client is running as a standalone main method it works fine but when the same code is called while running in web app it gets fault Faultcode = { http://www.w3.org/2005/08/addressing }ActionNotSupported Reason = The server did not recognise the action which it received: -I tried running cient and server on two different hosts and same host - no change. This is my services.xml http://www.w3.org/ns/wsdl/in-out " class="com.customer.service.rtbcallevent.RtbCallEventMessageReceiverInOut"/> com.customer.service.rtbcallevent.RtbCallEventSkeleton true true http://www.w3.org/ns/wsdl/in-out "> \"\" urn:rtbCallEvent/wsdl:rtbCallEventSEI:callEventResponse This is my java code RtbCallEventStub stub = new RtbCallEventStub(" http://10.96.201.30:8080/RTB/services/RtbCallEvent "); CallEvent7 callEvent = new CallEvent7(); CallEvent param = new CallEvent(); param.setAnswerTime("param"); param.setCalledNumber("param"); param.setCallingNumber("sdfds"); param.setDirection("sdf"); param.setGroup("successq"); param.setRecordId("sdfsd"); param.setReleaseTime("sdf"); callEvent.setCallEvent(param ); CallEventResponse6 resp = stub.callEvent(callEvent); System.out.println(resp.getCallEventResponse().getResult()); } catch (AxisFault e) { // TODO Auto-generated catch block System.out.println(e.getFaultCode()); System.out.println(e.getMessage()); System.out.println(e.getReason()); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } Any help will be appreciated. Regards, Srikanth Muthyala