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/ResponseStatu
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/ResponseStat
us"/>
<s:import
namespace="http://www.lenos.com/private/typelib/BITraveLinQ/AttendeeInfo
"/>
<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/LoginI
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"/>
</s:sequence>
</s:extension>
</s:complexContent>
</s:complexType>
<s:complexType name="LenosObjectBase"/>
</s:schema>
<s:schema elementFormDefault="qualified"
targetNamespace="http://www.lenos.com/private/typelib/BITraveLinQ/Respon
seStatus">
<s:complexType name="ResponseStatus">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Status"
type="s:boolean"/>
<s:element minOccurs="0" maxOccurs="1"
name="ConfirmationNumber" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="RedirectURL" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ExceptionString" type="s:string"/>
</s:sequence>
</s:complexType>
</s:schema>
<s:schema elementFormDefault="qualified"
targetNamespace="http://www.lenos.com/private/typelib/BITraveLinQ/Attend
eeInfo">
<s:complexType name="AttendeeInfo">
<s:complexContent mixed="false">
<s:extension base="s3:LenosObjectBase">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="PID" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue01" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FirstName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="MiddleInitial" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="LastName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="Title" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="BadgeName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="WorkPhone" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FaxNumber" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="MobilePhone" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="HomePhone" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="PrimaryEmail" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="CompanyName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="Address" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="Address2" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="City" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="State" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="PostalCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="Country" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="HomeAddress" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="HomeAddress2" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="HomeCity" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="HomeState" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="HomePostalCode" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="HomeCountry" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="SSN" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="PassportNumber" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="DriverLicenseNumber" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="IssueCountry" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="IssueDate" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ExpirationDate" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="BirthDate" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="Citizinship" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ADAAudio" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ADAVisual" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ADAMobile" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="Smoking" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FrequentFlyerNumber1" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FrequentFlyerAirline1" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FrequentFlyerNumber2" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FrequentFlyerAirline2" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FrequentFlyerNumber3" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="FrequentFlyerAirline3" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="PreferredDepartureAirport" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue02" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue03" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue04" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue05" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue06" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue07" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue08" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue09" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue10" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue11" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue12" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue13" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue14" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1"
name="ClientExtValue15" type="s:string"/>
</s:sequence>
</s:extension>
</s:complexContent>
</s:complexType>
<s:complexType name="LenosObjectBase"/>
</s:schema>
</wsdl:types>
<wsdl:message name="LoginSoapIn">
<wsdl:part name="parameters" element="tns:Login"/>
</wsdl:message>
<wsdl:message name="LoginSoapOut">
<wsdl:part name="parameters" element="tns:LoginResponse"/>
</wsdl:message>
<wsdl:message name="RegisterSoapIn">
<wsdl:part name="parameters" element="tns:Register"/>
</wsdl:message>
<wsdl:message name="RegisterSoapOut">
<wsdl:part name="parameters" element="tns:RegisterResponse"/>
</wsdl:message>
<wsdl:message name="UpdateSoapIn">
<wsdl:part name="parameters" element="tns:Update"/>
</wsdl:message>
<wsdl:message name="UpdateSoapOut">
<wsdl:part name="parameters" element="tns:UpdateResponse"/>
</wsdl:message>
<wsdl:portType name="ReceiveSoap">
<wsdl:operation name="Login">
<wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Reference for Login Method
to be implemented by Lenos</wsdl:documentation>
<wsdl:input message="tns:LoginSoapIn"/>
<wsdl:output message="tns:LoginSoapOut"/>
</wsdl:operation>
<wsdl:operation name="Register">
<wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Reference for Register
Method to be implemented by Lenos</wsdl:documentation>
<wsdl:input message="tns:RegisterSoapIn"/>
<wsdl:output message="tns:RegisterSoapOut"/>
</wsdl:operation>
<wsdl:operation name="Update">
<wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Reference for Update
Method to be implemented by Lenos</wsdl:documentation>
<wsdl:input message="tns:UpdateSoapIn"/>
<wsdl:output message="tns:UpdateSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ReceiveSoap" type="tns:ReceiveSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Login">
<soap:operation
soapAction="http://lenos.com/private/service/BITraveLinQ/Login"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Register">
<soap:operation
soapAction="http://lenos.com/private/service/BITraveLinQ/Register"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Update">
<soap:operation
soapAction="http://lenos.com/private/service/BITraveLinQ/Update"
style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="ReceiveSoap12" type="tns:ReceiveSoap">
<soap12:binding
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Login">
<soap12:operation
soapAction="http://lenos.com/private/service/BITraveLinQ/Login"
style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Register">
<soap12:operation
soapAction="http://lenos.com/private/service/BITraveLinQ/Register"
style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="Update">
<soap12:operation
soapAction="http://lenos.com/private/service/BITraveLinQ/Update"
style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</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: [email protected]
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: [email protected]
> 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 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]
>
>
---------------------------------------------------------------------
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]