Axis 1: Set HTTP Proxy Host and Port
Hello, I'm using Axis 1 (not Axis2) to generate the client stubs for accessing a remote web service. How can I programmatically set the HTTP proxy host and port to be used? The http.proxyHost and http.proxyPort JVM arguments are unavailable in the production environment. Also, is there a way, at runtime, to specify the actual web service endpoint URL? The testing and production sites have different URLs, and it woudl be nice to be able to specify this at runtime instead of having to update the WSDL and rebuilding each time. Thanks!! -Ryan This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you.
RE: Cannot Infer Transport Error
Interesting catch. I do have a soap:binding tag, but it doesn't have a style attribute: soap:binding transport=http://schemas.xmlsoap.org/soap/http/ Maybe that could be it? -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] Sent: Friday, March 09, 2007 8:54 PM To: axis-user@ws.apache.org Subject: Re: Cannot Infer Transport Error Just a guess, but in the below tutorial[1], do a search on the word transport within listing #21 (on page 4.) This is the code I see there: wsdl:binding name=ClassifiedServiceBinding type=tns:ClassifiedServicePortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document / ... Do you have something like this in your wsdl? Glen [1] http://www-128.ibm.com/developerworks/edu/ws-dw-ws-understand-web-servic es2.html Am Freitag, den 09.03.2007, 10:22 -0600 schrieb Asleson, Ryan: Hello, I'm attempting to use Apache Axis2 1.1.1 to create a web service client for accessing remote web services. I am currently using WebLogic 8.1's built in web service client, but I would like to migrate away from this to Axis2. I used the WSDL2Java tool from the command line to generate the client stubs from the WSDL. So far, so good. I know the WSDL is valid because it's the same one I currently use in production using WebLogic's web service client. When I try to use the Axis2 generated stub to access the web service, it fails with this message: org.apache.axis2.AxisFault: No address information in EPR, cannot infer transport I did some web searching and EPR seems to to with endpoints, but I don't know where to go from here. According to the examples I should just be able to generate the client stub and go from there, but it's failing with this error. Like I said, I know the WSDL is valid because I currently use it in production. Can anybody shed some light on what's going wrong here? Thank you!! This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot Infer Transport Error
/ /wsdl:input wsdl:output soap12:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=Receive wsdl:documentation xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;Lenos Web Service for BITraveLinQ Integration/wsdl:documentation wsdl:port name=ReceiveSoap binding=tns:ReceiveSoap soap:address location=ENDPOINT LOCATION HERE/ /wsdl:port wsdl:port name=ReceiveSoap12 binding=tns:ReceiveSoap12 soap12:address location=ENDPOINT LOCATION HERE/ /wsdl:port /wsdl:service /wsdl:definitions Here's the client code I'm using: public ResponseStatus login() throws AxisFault, RemoteException { ReceiveStub stub = new ReceiveStub(); LoginInfo loginInfo = new LoginInfo(); loginInfo.setClientExtValue01(username); loginInfo.setPID(0012345); loginInfo.setPrimaryEmail([EMAIL PROTECTED]); Login login = new Login(); login.setLoginInfo(loginInfo); //set the proxy information setProxy(stub); LoginResponse response = stub.Login(login); return response.getResponseStatus(); } private void setProxy(Stub stub) { Options options = new Options(); ProxyProperties proxyProperties = new ProxyProperties(); proxyProperties.setProxyName(intproxy.mycompany.com); proxyProperties.setProxyPort(8080); stub._getServiceClient().setOptions(options); } -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Monday, March 12, 2007 8:47 AM To: axis-user@ws.apache.org Subject: Re: Cannot Infer Transport Error No -- the default is style=document. 1- I would not assume that the WSDL is valid just because it worked in WebLogic 8.1. Many SOAP engines are fairly lax when it comes to WSDL validation. 2- The EPR is an endpoint reference -- it's a WS-Addressing structure. Please provide more information, e.g., the wsdl2java command, the WSDL, your client code, etc. Anne On 3/12/07, Asleson, Ryan [EMAIL PROTECTED] wrote: Interesting catch. I do have a soap:binding tag, but it doesn't have a style attribute: soap:binding transport=http://schemas.xmlsoap.org/soap/http/ Maybe that could be it? -Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] Sent: Friday, March 09, 2007 8:54 PM To: axis-user@ws.apache.org Subject: Re: Cannot Infer Transport Error Just a guess, but in the below tutorial[1], do a search on the word transport within listing #21 (on page 4.) This is the code I see there: wsdl:binding name=ClassifiedServiceBinding type=tns:ClassifiedServicePortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document / ... Do you have something like this in your wsdl? Glen [1] http://www-128.ibm.com/developerworks/edu/ws-dw-ws-understand-web-serv ic es2.html Am Freitag, den 09.03.2007, 10:22 -0600 schrieb Asleson, Ryan: Hello, I'm attempting to use Apache Axis2 1.1.1 to create a web service client for accessing remote web services. I am currently using WebLogic 8.1's built in web service client, but I would like to migrate away from this to Axis2. I used the WSDL2Java tool from the command line to generate the client stubs from the WSDL. So far, so good. I know the WSDL is valid because it's the same one I currently use in production using WebLogic's web service client. When I try to use the Axis2 generated stub to access the web service, it fails with this message: org.apache.axis2.AxisFault: No address information in EPR, cannot infer transport I did some web searching and EPR seems to to with endpoints, but I don't know where to go from here. According to the examples I should just be able to generate the client stub and go from there, but it's failing with this error. Like I said, I know the WSDL is valid because I currently use it in production. Can anybody shed some light on what's going wrong here? Thank you!! This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply
RE: Cannot Infer Transport Error
Good catch! However, I removed the real endpoint from the WSDL I pasted in for security reasons. The real WSDL has an endpoint listed. -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Monday, March 12, 2007 9:40 AM To: axis-user@ws.apache.org Subject: Re: Cannot Infer Transport Error Ryan The WSDL doesn't specify a real endpoint URL, which means that you have to specify one when you run the code. You can do it by passing the endpoint to the stub: ReceiveStub rs = new ReceiveStub(http://therealendpoint/here;); Paul On 3/12/07, Asleson, Ryan [EMAIL PROTECTED] wrote: Here's the WSDL2Java command used: target name=client.codegen-stub java classname=org.apache.axis2.wsdl.WSDL2Java arg value=-uri / arg value=${basedir}/wsdl/service-description.xml / arg value=-p / arg value=axis2gen.stub / arg value=-o / arg value=${basedir}/src / arg value=-f/ classpath refid=build.class.path / /java /target And here's the WSDL. Please note I changed the endpoint URLs for security reasons: ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:s3=http://www.lenos.com/private/typelib/BITraveLinQ/AttendeeInfo; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tns=http://lenos.com/private/service/BITraveLinQ/; xmlns:s1=http://www.lenos.com/private/typelib/BITraveLinQ/LoginInfo; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:s2=http://www.lenos.com/private/typelib/BITraveLinQ/ResponseSta tu s xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; targetNamespace=http://lenos.com/private/service/BITraveLinQ/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; wsdl:documentation xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;Lenos Web Service for BITraveLinQ Integration/wsdl:documentation wsdl:types s:schema elementFormDefault=qualified targetNamespace=http://lenos.com/private/service/BITraveLinQ/; s:import namespace=http://www.lenos.com/private/typelib/BITraveLinQ/LoginInfo/ s:import namespace=http://www.lenos.com/private/typelib/BITraveLinQ/ResponseSt at us/ s:import namespace=http://www.lenos.com/private/typelib/BITraveLinQ/AttendeeIn fo / s:element name=Login s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=LoginInfo nillable=true type=s1:LoginInfo/ /s:sequence /s:complexType /s:element s:element name=LoginResponse s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=ResponseStatus nillable=true type=s2:ResponseStatus/ /s:sequence /s:complexType /s:element s:element name=Register s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=AttendeeInfo nillable=true type=s3:AttendeeInfo/ /s:sequence /s:complexType /s:element s:element name=RegisterResponse s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=ResponseStatus nillable=true type=s2:ResponseStatus/ /s:sequence /s:complexType /s:element s:element name=Update s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=LoginInfo nillable=true type=s1:LoginInfo/ /s:sequence /s:complexType /s:element s:element name=UpdateResponse s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=AttendeeInfo nillable=true type=s3:AttendeeInfo/ /s:sequence /s:complexType /s:element /s:schema s:schema elementFormDefault=qualified targetNamespace=http://www.lenos.com/private/typelib/BITraveLinQ/Logi nI nfo s:complexType name=LoginInfo s:complexContent mixed=false s:extension base=s1:LenosObjectBase s:sequence s:element minOccurs=0 maxOccurs=1 name=PID type=s:string/ s:element minOccurs=0 maxOccurs=1 name=PrimaryEmail type=s:string/ s:element minOccurs=0 maxOccurs=1 name=ClientExtValue01 type=s:string
RE: Cannot Infer Transport Error
Yes, it does include http:// . -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Monday, March 12, 2007 10:55 AM To: axis-user@ws.apache.org Subject: Re: Cannot Infer Transport Error Ryan Does the real URI include the http:// Paul On 3/12/07, Asleson, Ryan [EMAIL PROTECTED] wrote: Good catch! However, I removed the real endpoint from the WSDL I pasted in for security reasons. The real WSDL has an endpoint listed. -Original Message- From: Paul Fremantle [mailto:[EMAIL PROTECTED] Sent: Monday, March 12, 2007 9:40 AM To: axis-user@ws.apache.org Subject: Re: Cannot Infer Transport Error Ryan The WSDL doesn't specify a real endpoint URL, which means that you have to specify one when you run the code. You can do it by passing the endpoint to the stub: ReceiveStub rs = new ReceiveStub(http://therealendpoint/here;); Paul On 3/12/07, Asleson, Ryan [EMAIL PROTECTED] wrote: Here's the WSDL2Java command used: target name=client.codegen-stub java classname=org.apache.axis2.wsdl.WSDL2Java arg value=-uri / arg value=${basedir}/wsdl/service-description.xml / arg value=-p / arg value=axis2gen.stub / arg value=-o / arg value=${basedir}/src / arg value=-f/ classpath refid=build.class.path / /java /target And here's the WSDL. Please note I changed the endpoint URLs for security reasons: ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:s3=http://www.lenos.com/private/typelib/BITraveLinQ/AttendeeInfo; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:tns=http://lenos.com/private/service/BITraveLinQ/; xmlns:s1=http://www.lenos.com/private/typelib/BITraveLinQ/LoginInfo; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:s2=http://www.lenos.com/private/typelib/BITraveLinQ/ResponseS ta tu s xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; targetNamespace=http://lenos.com/private/service/BITraveLinQ/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; wsdl:documentation xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;Lenos Web Service for BITraveLinQ Integration/wsdl:documentation wsdl:types s:schema elementFormDefault=qualified targetNamespace=http://lenos.com/private/service/BITraveLinQ/; s:import namespace=http://www.lenos.com/private/typelib/BITraveLinQ/LoginInfo; / s:import namespace=http://www.lenos.com/private/typelib/BITraveLinQ/Response St at us/ s:import namespace=http://www.lenos.com/private/typelib/BITraveLinQ/Attendee In fo / s:element name=Login s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=LoginInfo nillable=true type=s1:LoginInfo/ /s:sequence /s:complexType /s:element s:element name=LoginResponse s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=ResponseStatus nillable=true type=s2:ResponseStatus/ /s:sequence /s:complexType /s:element s:element name=Register s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=AttendeeInfo nillable=true type=s3:AttendeeInfo/ /s:sequence /s:complexType /s:element s:element name=RegisterResponse s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=ResponseStatus nillable=true type=s2:ResponseStatus/ /s:sequence /s:complexType /s:element s:element name=Update s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=LoginInfo nillable=true type=s1:LoginInfo/ /s:sequence /s:complexType /s:element s:element name=UpdateResponse s:complexType s:sequence s:element minOccurs=1 maxOccurs=1 name=AttendeeInfo nillable=true type=s3:AttendeeInfo/ /s:sequence /s:complexType /s:element /s:schema s:schema elementFormDefault=qualified targetNamespace=http://www.lenos.com/private/typelib/BITraveLinQ/Lo gi nI nfo
Cannot Infer Transport Error
Hello, I'm attempting to use Apache Axis2 1.1.1 to create a web service client for accessing remote web services. I am currently using WebLogic 8.1's built in web service client, but I would like to migrate away from this to Axis2. I used the WSDL2Java tool from the command line to generate the client stubs from the WSDL. So far, so good. I know the WSDL is valid because it's the same one I currently use in production using WebLogic's web service client. When I try to use the Axis2 generated stub to access the web service, it fails with this message: org.apache.axis2.AxisFault: No address information in EPR, cannot infer transport I did some web searching and EPR seems to to with endpoints, but I don't know where to go from here. According to the examples I should just be able to generate the client stub and go from there, but it's failing with this error. Like I said, I know the WSDL is valid because I currently use it in production. Can anybody shed some light on what's going wrong here? Thank you!! This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you.