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!

How to get method signature from the wsdl file

843833Jan 4 2010 — edited Jan 4 2010
Hi All,

Thanks for reading.

I am having problems reading method signatures from the wsdl url.

I am using WSDL4J to parse the wsdl url. I can get a list of method names using the operation.getName() method. But I do not know, how to get method signature (input argument name & data types, and return type).

Following is my wsdl. And below it is the schema for it.

Code samples would be of great help.

Any help would be greatly appreciated.

Thanks in advance
Farhan !
<?xml version="1.0" encoding="UTF-8" ?> 
- <!--  Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-749-SNAPSHOT. 
--> 
- <!--  Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-749-SNAPSHOT. 
--> 
- <definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://as.asm/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" 
targetNamespace="http://as.asm/" name="StateService">
- <types>
- <xsd:schema>
<xsd:import namespace="http://as.asm/" 
schemaLocation="http://localhost:15816/StateService/StateService?xsd=1" /> 
</xsd:schema>
</types>
- <message name="getState">
<part name="parameters" element="tns:getState" /> 
</message>
- <message name="getStateResponse">
<part name="parameters" element="tns:getStateResponse" /> 
</message>
- <message name="IOException">
<part name="fault" element="tns:IOException" /> 
</message>
- <portType name="StateService">
- <operation name="getState">
<input message="tns:getState" /> 
<output message="tns:getStateResponse" /> 
<fault message="tns:IOException" name="IOException" /> 
</operation>
</portType>
- <binding name="StateServicePortBinding" type="tns:StateService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> 
- <operation name="getState">
<soap:operation soapAction="" /> 
- <input>
<soap:body use="literal" /> 
</input>
- <output>
<soap:body use="literal" /> 
</output>
- <fault name="IOException">
<soap:fault name="IOException" use="literal" /> 
</fault>
</operation>
</binding>
- <service name="StateService">
- <port name="StateServicePort" binding="tns:StateServicePortBinding">
<soap:address location="http://localhost:15816/StateService/StateService" /> 
</port>
</service>
</definitions>
and the schema is:
<?xml version="1.0" encoding="UTF-8" ?> 
- <!--  Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.1-hudson-749-SNAPSHOT. 
--> 
- <xs:schema xmlns:tns="http://as.asm/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://as.asm/">
<xs:element name="IOException" type="tns:IOException" /> 
<xs:element name="getState" type="tns:getState" /> 
<xs:element name="getStateResponse" type="tns:getStateResponse" /> 
- <xs:complexType name="getState">
- <xs:sequence>
<xs:element name="arg0" type="xs:string" minOccurs="0" /> 
<xs:element name="arg1" type="xs:string" minOccurs="0" /> 
<xs:element name="arg2" type="xs:string" minOccurs="0" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="getStateResponse">
- <xs:sequence>
<xs:element name="return" type="xs:string" minOccurs="0" /> 
</xs:sequence>
</xs:complexType>
- <xs:complexType name="IOException">
- <xs:sequence>
<xs:element name="message" type="xs:string" minOccurs="0" /> 
</xs:sequence>
</xs:complexType>
</xs:schema>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2010
Added on Jan 4 2010
1 comment
511 views