Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apache Axis 2 ver 1.4 WSDL2Java aSyncOnly and syncOnly problem.

843833Oct 7 2008
In a ntshell my problem is that I cannot see any significant differance between code generate using the aSyncOnly vs the syncOnly paramter.

I am generating code from a wsdl (listed below) using WSDL2Java with the following parameters
http://swlgmsnetd1/iao/customerservice.asmx?WSDL -o .\generate -p com.wsdl.person -s
and get the following files generated
Customer.java
CustomerService.java
CustomerLocator.java
CustomerServiceSoap_BindingImpl.java
CustomerServiceSoap_BindingStub.java
CustomerServiceSoap_PortType.java
CustomerServiceSoap12Impl.java
CustomerServiceSoap12Stub.java
deploy.wsdd
undeploy.wsdd

if I change the last parameter from -s to -a the files are generated as follows:
Customer.java
CustomerService.java
CustomerLocator.java
CustomerServiceSoap_BindingStub.java
CustomerServiceSoap_PortType.java
CustomerServiceSoap12Stub.java

To access the web service I am using the following code (for either set of generated code)

CustomerServiceSoap_PortType customerServiceSoap = new CustomerServiceLocator().getCustomerServiceSoap();
Customer customer = customerServiceSoap.getCustomer(22);

I cannot see any difference between the generated class that my code uses and hence cannot see how I can turn my call from a synchronous call (which is what my code seems to be doing) to an asynchronous call.

Any assistance would be greatly appreciatted.

Thanks

Richard Peters

<?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:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="GetCustomer">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="id" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCustomerResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetCustomerResult" type="tns:Customer" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Customer">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Id" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Address" type="tns:ArrayOfString" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfString">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="GetCustomerSoapIn">
<wsdl:part name="parameters" element="tns:GetCustomer" />
</wsdl:message>
<wsdl:message name="GetCustomerSoapOut">
<wsdl:part name="parameters" element="tns:GetCustomerResponse" />
</wsdl:message>
<wsdl:portType name="CustomerServiceSoap">
<wsdl:operation name="GetCustomer">
<wsdl:input message="tns:GetCustomerSoapIn" />
<wsdl:output message="tns:GetCustomerSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CustomerServiceSoap" type="tns:CustomerServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetCustomer">
<soap:operation soapAction="http://tempuri.org/GetCustomer" 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="CustomerServiceSoap12" type="tns:CustomerServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetCustomer">
<soap12:operation soapAction="http://tempuri.org/GetCustomer" 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="CustomerService">
<wsdl:port name="CustomerServiceSoap" binding="tns:CustomerServiceSoap">
<soap:address location="http://swlgmsnetd1/iao/customerservice.asmx" />
</wsdl:port>
<wsdl:port name="CustomerServiceSoap12" binding="tns:CustomerServiceSoap12">
<soap12:address location="http://swlgmsnetd1/iao/customerservice.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 4 2008
Added on Oct 7 2008
0 comments
163 views