Java provider doesn't handle wrapped-style
------------------------------------------
Key: WSIF-67
URL: http://nagoya.apache.org/jira/browse/WSIF-67
Project: Axis-WSIF
Type: Bug
Components: Basic Architecture
Versions: current (nightly)
Environment: J2SDK 5.0, Apache Axis 1.2RC2
Reporter: Michael Schuerig
Priority: Minor
Here's a simple sample of wrapped document/literal that the Java provider can't
handle. It works with the SOAP/Axis provider.
---->----DocLitWrapped.wsdl---->-----
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://www.schuerig.de/test/wsif"
xmlns:impl="http://www.schuerig.de/test/wsif"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
xmlns:java="http://schemas.xmlsoap.org/wsdl/java/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema
elementFormDefault="qualified"
targetNamespace="http://www.schuerig.de/test/wsif"
xmlns:tns="http://www.schuerig.de/test/wsif"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="getMyStuff">
<complexType>
<sequence>
<element name="whichone" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="getMyStuffResponse">
<complexType>
<sequence>
<element name="stuff" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="getMyStuffRequest">
<wsdl:part name="parameters" element="impl:getMyStuff"/>
</wsdl:message>
<wsdl:message name="getMyStuffResponse">
<wsdl:part name="parameters" element="impl:getMyStuffResponse"/>
</wsdl:message>
<wsdl:portType name="MyStuffPortType">
<wsdl:operation name="getMyStuff">
<wsdl:input name="getMyStuffRequest"
message="impl:getMyStuffRequest"/>
<wsdl:output name="getMyStuffResponse"
message="impl:getMyStuffResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="MyStuffPortJavaBinding" type="impl:MyStuffPortType">
<java:binding/>
<format:typeMapping encoding="Java" style="Java">
<format:typeMap typeName="xsd:string" formatType="java.lang.String"/>
</format:typeMapping>
<wsdl:operation name="getMyStuff">
<java:operation
methodName="getMyStuff"
parameterOrder="whichone"
returnPart="stuff"
methodType="instance">
<wsdl:input name="getMyStuffRequest"/>
<wsdl:output name="getMyStuffResponse"/>
</java:operation>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="MyStuffPortSoapBinding" type="impl:MyStuffPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getMyStuff">
<soap:operation soapAction="getMyStuff"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="MyStuffService">
<wsdl:port name="MyStuffJavaPort"
binding="impl:MyStuffPortJavaBinding">
<java:address className="de.schuerig.test.wsif.Server"/>
</wsdl:port>
<wsdl:port name="MyStuffSoapPort"
binding="impl:MyStuffPortSoapBinding">
<soap:address location="http://localhost:8080/axis/Server.jws"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---->---->---->---->---->
---->----Server.java/Server.jws---->---->
// comment package out for JWS deployment
package de.schuerig.test.wsif;
public class Server {
public String getMyStuff(String whichone) {
return whichone;
}
}
---->---->---->---->---->
---->----Client.java---->---->
package de.schuerig.test.wsif;
import org.apache.wsif.WSIFMessage;
import org.apache.wsif.WSIFOperation;
import org.apache.wsif.WSIFPort;
import org.apache.wsif.WSIFService;
import org.apache.wsif.WSIFServiceFactory;
public class Client {
public static void testit(String portName) throws Exception {
WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
WSIFService service = factory.getService(
"DocLitWrapped.wsdl",
"http://www.schuerig.de/test/wsif",
"MyStuffService",
"http://www.schuerig.de/test/wsif",
"MyStuffPortType");
WSIFPort port = service.getPort(portName);
WSIFOperation op = port.createOperation("getMyStuff");
WSIFMessage input = op.createInputMessage();
WSIFMessage output = op.createOutputMessage();
WSIFMessage fault = op.createFaultMessage();
input.setObjectPart("whichone", "the blue one");
boolean ok = op.executeRequestResponseOperation(input, output, fault);
Object result = output.getObjectPart("stuff");
System.out.println("RESULT(" + portName + "): " + result);
}
public static void main(String[] args) throws Exception {
try {
testit("MyStuffSoapPort");
System.out.println("SOAP provider works");
} catch (Exception e) {
System.out.println("SOAP provider does not work");
e.printStackTrace();
}
try {
testit("MyStuffJavaPort");
System.out.println("Java provider works");
} catch (Exception e) {
System.out.println("Java provider does not work");
e.printStackTrace();
}
}
}
---->---->---->---->---->
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira