why xsd schema cannot validate string length with restriction maxLength - web-services

I'm developping a web service SOAP and I've defined my xsd schema and wsdl file, in which I want to validate the element comment (whose type is string) by fixing his max length. But when I validate the request with SoapUI, It seems to me the xsd schema doesn't validate the string max length.
This below is the syntax of my xsd schema :
<xsd:element name="comment" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Anyone knows why? Thanks in advance.

SOAPUI validates the SOAP request against to its xsd correctly however you have to make a on purpose validation selecting the validate option right clicking on SOAP Request window (as its showed in the last picture), if you send the request directly without validate it, SOAPUI simply sends the request even if it's a bad formed xml because SOAPUI is a testing tool an you maybe want to send a bad request on purpose to test your WS.
I make a sample with maxLength <restriction> in <xs:string> an I get the follow result (I'm using SOAPUI 4.5.2):
To do this I use the follow wsdl:
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:impl="sample:wsdl"
xmlns:dss="sample:schema"
targetNamespace="sample:wsdl" name="dss">
<!-- Schema Type Definitions -->
<types>
<xs:schema xmlns:dss="sample:schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="sample:schema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<!-- COMMON PROTOCOL STRUCTURES -->
<xs:element name="comment" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>
</types>
<!--Messages-->
<message name="CommentRequest">
<part name="CommentRequest" element="dss:comment"/>
</message>
<!-- PortTypes -->
<portType name="SOAPport">
<operation name="doComment">
<input message="impl:CommentRequest"/>
<output message="xs:anyType"/>
</operation>
</portType>
<!-- Bindings -->
<binding name="SOAPBinding" type="impl:SOAPport">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="doComment">
<soap:operation/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<!--Service definition-->
<service name="doCommentService">
<port name="dssPortSoap" binding="impl:SOAPBinding">
<soap:address location="http://testing.stackoverflow.answer"/>
</port>
</service>
</definitions>
As you can see in the wsdl the CommentRequest as the follow schema with maxLength <restriction>:
<xs:schema xmlns:dss="sample:schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="sample:schema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<!-- COMMON PROTOCOL STRUCTURES -->
<xs:element name="comment" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>
Then I create a new SOAPUI project from the wsdl and add a SOAP Request, if I put a string with more than 20 characters in <comment/> and press right click on SOAP Request window and select Validate it give you the error message showed in the first picture:
Hope this helps,

Related

SOAPUI error: does not close tag

When starting a SOAPUI SOAP project (from my local computer) using the following URL (on a server in my own network):
http://myinternaldomainname/test2?wsdl
The following error occurs:
Error loading [http://myinternaldomainname/test2?wsdl]:
org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException:
error: does not close tag
The server is added to my hosts file:
192.168.2.1 myexampledomain
When I store the result of the WSDL page as a wsdl file, I can open the WSDL file as new SOAP project.
I used Zend\Soap\Autodiscovery to generate this WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://myexampledomain/test2" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" name="MySoapService" targetNamespace="http://myexampledomain/test2">
<types>
<xsd:schema targetNamespace="http://myexampledomain/test2"/>
</types>
<portType name="MySoapServicePort">
<operation name="method1">
<documentation>This method takes ...</documentation>
<input message="tns:method1In"/>
<output message="tns:method1Out"/>
</operation>
<operation name="method2">
<documentation>This method takes ...</documentation>
<input message="tns:method2In"/>
<output message="tns:method2Out"/>
</operation>
</portType>
<binding name="MySoapServiceBinding" type="tns:MySoapServicePort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="method1">
<soap:operation soapAction="http://myexampledomain/test2#method1"/>
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
</output>
</operation>
<operation name="method2">
<soap:operation soapAction="http://myexampledomain/test2#method2"/>
<input>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
</input>
<output>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myexampledomain/test2"/>
</output>
</operation>
</binding>
<service name="MySoapServiceService">
<port name="MySoapServicePort" binding="tns:MySoapServiceBinding">
<soap:address location="http://myexampledomain/test2"/>
</port>
</service>
<message name="method1In">
<part name="inputParam" type="xsd:int"/>
</message>
<message name="method1Out">
<part name="return" type="xsd:string"/>
</message>
<message name="method2In">
<part name="inputParam1" type="xsd:int"/>
<part name="inputParam2" type="xsd:string"/>
</message>
<message name="method2Out">
<part name="return" type="xsd:float"/>
</message>
</definitions>
In SOAPUI I tried proxy disabled/enabled/automatic
If someone ever encounters this problem, what worked for me was hitting CTRL + ALT + P and setting the Proxy Settings to None
Please disable proxy by using CTRL+ALT+P and disable system firewall. hopefully it will work.
The problem was caused because a login page prevented me to use the WSDL in SOAP UI.

SOAPAction error on WS consuption

I'm trying to query a WS from IBMIntegrationBus v10 using the SOAPRequest node.
SoapUI has no problems consuming this WS with the following payload:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsg="http://wsgetrama.wsbeans.iseries/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soapenv:Header/>
<soapenv:Body>
<out:wsgetrama xmlns:out="http://wsgetrama.wsbeans.iseries/">
<arg0>
<PERAMA>1</PERAMA>
<PERAMD>Test</PERAMD>
</arg0>
</out:wsgetrama>
</soapenv:Body>
</soapenv:Envelope>
The raw data is as follows:
POST http://192.168.1.116:10028/web/services/WSGETRAMAService/WSGETRAMA HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
Content-Length: 643
Host: 192.168.1.116:10028
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
I'm trying to consume a WS with the following WSDL:
<definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://wsgetrama.wsbeans.iseries/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="WSGETRAMA" targetNamespace="http://wsgetrama.wsbeans.iseries/">
<types>
<xs:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://wsgetrama.wsbeans.iseries/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://wsgetrama.wsbeans.iseries/" version="1.0">
<xs:element name="wsgetrama" type="tns:wsgetrama"/>
<xs:element name="wsgetramaResponse" type="tns:wsgetramaResponse"/>
<xs:complexType name="wsgetrama">
<xs:sequence>
<xs:element name="arg0" type="tns:wsgetramaInput"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="wsgetramaInput">
<xs:sequence>
<xs:element name="PERAMA" type="xs:decimal"/>
<xs:element name="PERAMD" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="wsgetramaResponse">
<xs:sequence>
<xs:element name="return" type="tns:wsgetramaResult"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="wsgetramaResult">
<xs:sequence>
<xs:element name="PERAMD" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</types>
<message name="wsgetrama">
<part element="tns:wsgetrama" name="parameters"></part>
</message>
<message name="wsgetramaResponse">
<part element="tns:wsgetramaResponse" name="parameters"></part>
</message>
<portType name="WSGETRAMAServices">
<operation name="wsgetrama">
<input message="tns:wsgetrama" wsam:Action="http://wsgetrama.wsbeans.iseries/WSGETRAMAServices/wsgetramaRequest"></input>
<output message="tns:wsgetramaResponse" wsam:Action="http://wsgetrama.wsbeans.iseries/WSGETRAMAServices/wsgetramaResponse"></output>
</operation>
</portType>
<binding name="WSGETRAMAServicesPortBinding" type="tns:WSGETRAMAServices">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="wsgetrama">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="WSGETRAMA">
<port binding="tns:WSGETRAMAServicesPortBinding" name="WSGETRAMAServicesPort">
<soap:address location="http://192.168.1.116:10028/web/services/WSGETRAMAService/WSGETRAMA"/>
</port>
</service>
</definitions>
While SoapUI has no problems consuming it, when I try the same on the integration bus, I get the following error:
The given SOAPAction wsgetrama does not match an operation
For consuming this WS, I've imported the mentioned WSDL and based the SOAPRequest Node on it.
Any ideas will be greatly appreciated!
Thanks!
Sean
I'm having the same problem. I'm trying to consume a web service exposed in jboss EAP 6.2 from IBM Integration Bus message flow, and I got the same message (the service goes unresponsive and looking at server.log I noticed the same error "The given SOAPAction generarDocumento does not match an operation").
The wsdl indeed contains a soapaction that is blank:
<wsdl:operation name="generarDocumento">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="generarDocumento">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="generarDocumentoResponse">
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ControladaException">
<soap:fault name="ControladaException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
After hours I've found this on IBM Knowledge Base:
"If a SOAPAction is set to an empty string in the HTTPInput header, it is overridden, unless the action is set explicitly in the HTTPRequest header, for example:
SET OutputRoot.HTTPRequestHeader.SOAPAction = InputRoot.HTTPInputHeader.SOAPAction
"
I'm using a JavaCompute node, so I'm still figuring out how to translate the above ESQL Code to Java, in order to replace the HTTP Request and set the soapaction to blank.
I'll let you all know if I made it.

Mulesoft-CXF WSDL-First Web service error

All,
I have an issue with developing a contract-first SOAP web service in AnyPoint Studio (July 2014, with Muleserver 3.5.1 on max OS X, JDK 7). My process is:
Create WSDL by hand (XML Schema embedded inside WSDL for simplicity)
Create Synchronous HTTP flow in Anypoint
Generate Java classes from WSDL (no errors, works fine)
Start Flow from inside IDE (no errors,works fine).
Import WSDL and generate SOAP request in SOAPUI (no errors, works fine)
invoke SOAP request
AT this point I get the following error on marshalling the SOAP request (my flow has no backend logic and will fail - but that is not the issue):
org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://login.demo/}LoginServiceService has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Message part {urn:MYNAMESPACE}requestParms was not recognized. (Does it exist in service WSDL?)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.validatePart(DocLiteralInInterceptor.java:231)
at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:201)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at org.mule.module.cxf.CxfInboundMessageProcessor.sendToDestination(CxfInboundMessageProcessor.java:338)
My WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:MYNAMESPACE"
xmlns:tns="urn:MYNAMESPACE"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wsdl:types>
<xs:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:MYNAMESPACE"
xmlns="urn:MYNAMESPACE"
elementFormDefault="unqualified" attributeFormDefault="unqualified">
<xs:element name="requestParms" type="LoginRequestType" />
<xs:element name="responseParms" type="LoginResponseType"/>
<xs:complexType name="LoginRequestType">
<xs:sequence>
<xs:element name="username" type="xs:string"/>
<xs:element name="password" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LoginResponseType">
<xs:sequence>
<xs:element name="success" type="xs:boolean"/>
<xs:element name="authenticatedToken" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<!-- MESSAGES -->
<wsdl:message name="LoginRequest">
<wsdl:part name="parameters" element="tns:requestParms"/>
</wsdl:message>
<wsdl:message name="LoginResponse">
<wsdl:part name="parameters" element="tns:responseParms"/>
</wsdl:message>
<!-- WSDL Port Types -->
<wsdl:portType name="AuthenticatePortType">
<wsdl:operation name="login">
<wsdl:input message="tns:LoginRequest"/>
<wsdl:output message="tns:LoginResponse"/>
</wsdl:operation>
</wsdl:portType>
<!-- WSDL Bindings -->
<wsdl:binding name="AuthenticateBinding" type="tns:AuthenticatePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="login">
<soap:operation soapAction="login"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<!-- WSDL Services -->
<wsdl:service name="LoginService">
<wsdl:port name="LoginPort" binding="tns:AuthenticateBinding">
<soap:address location="http://localhost:8081/demo"/>
</wsdl:port>
</wsdl:service>
My Mule Config XML:
<http:endpoint exchange-pattern="request-response" host="localhost" port="8081" method="POST" name="HTTP" doc:name="HTTP"/>
<flow name="loginFlow" doc:name="loginFlow" initialState="started">
<http:inbound-endpoint exchange-pattern="request-response" path="demo" doc:name="Demo" host="localhost" port="8081"/>
<cxf:jaxws-service doc:name="CXF" validationEnabled="true" serviceClass="demo.login.LoginService"/>
</flow>
My SOAP Request:
<soapenv:Envelope xmlns:ns="urn:MYNAMESPACE"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
<soapenv:Header/>
<soapenv:Body>
<ns:requestParms>
<username>aa</username>
<password>bb</password>
</ns:requestParms>
</soapenv:Body>
</soapenv:Envelope>
Also, I have not modified the generated java code (wsdl2java I assume inside Anypoint) - just run it.
Any suggestions?

Deploy .war developed in jdeveloper on glassfish4.0

I developed a .war file in jdeveloper 10.1.3. And I want to deploy it on glassfish4.0 server which is standalone server.
Firstly I write a java code as
package com.oi.testdemohello;
public class TestHello {
public TestHello() {
}
public String sayHello(String name){
return "Hello "+name;
}
}
Than I create a J2EE1.4(JAX-RPC) and SOAP 1.1 Binding web services from that code in jdeveloper which statefull service.
The WSDL generated is as :
<definitions
name="MyWebService"
targetNamespace="http://testdemohello.oi.com/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://testdemohello.oi.com/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns0="http://testdemohello.oi.com/types/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://testdemohello.oi.com/types/"
elementFormDefault="qualified" xmlns:tns="http://testdemohello.oi.com/types/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
<element name="sayHelloElement">
<complexType>
<sequence>
<element name="name" type="string" nillable="true"/>
</sequence>
</complexType>
</element>
<element name="sayHelloResponseElement">
<complexType>
<sequence>
<element name="result" type="string" nillable="true"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="MyWebService_sayHello">
<part name="parameters" element="tns0:sayHelloElement"/>
</message>
<message name="MyWebService_sayHelloResponse">
<part name="parameters" element="tns0:sayHelloResponseElement"/>
</message>
<portType name="MyWebService">
<operation name="sayHello">
<input message="tns:MyWebService_sayHello"/>
<output message="tns:MyWebService_sayHelloResponse"/>
</operation>
</portType>
<binding name="MyWebServiceSoapHttp" type="tns:MyWebService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHello">
<soap:operation soapAction="http://testdemohello.oi.com//sayHello"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="MyWebService">
<port name="MyWebServiceSoapHttpPort" binding="tns:MyWebServiceSoapHttp">
<soap:address location="http://localMachine3:8888/TestDemoHello-DemoHello-context-root/MyWebServiceSoapHttpPort"/>
</port>
</service>
Than I deploy a .war file of this.
Now I want to deploy this .war file to glassfish 4.0 server. But I am not able to do it. How to do it please suggest me.
There are different options, outlined for example in this question: Best way to deploy on Glassfish V3. Your easiest option is to use the Glassfish Admin GUI on http://localhost:4848.
If you want something that is integrated in JDeveloper you can try GlassFish Extension for Oracle JDeveloper or read this article and this question.

WSDL Document Literal with parts referencing XSD types

I've been reading WSDL 1.1 specification and there's one thing that seems strange to me - what (beside WS-I Basic Profile) prevents me from doing this:
<message name="helloRequest">
<part name="arg1" type="xs:string" />
</message>
<message name="helloResponse">
<part name="result" type="xs:string" />
</message>
<portType name="Port02">
<operation name="hello">
<input message="tns:helloRequest" name="helloRequest" />
<output message="tns:helloResponse" name="helloResponse" />
</operation>
</portType>
<binding name="Port02SoapBinding" type="tns:Port02">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="hello">
<input name="helloRequest">
<soap:body use="literal" />
</input>
<output name="helloResponse">
<soap:body use="literal" />
</output>
</operation>
</binding>
It's document/literal web service, but in/out messages contain parts which refer to XSD (simple) types, not global elements.
The WSDL fragment is not that scary - Both Axis1 and CXF generate soap body elements which have names derived from part names, but WSDL 1.1, 3.5: soap:body says:
If use is literal, then each part references a concrete schema definition using either the element or type attribute. In the first case, [...]. In the second, the type referenced by the part becomes the schema type of the enclosing element (Body for document style or part accessor element for rpc style).
Does that mean that the resulting SOAP message (according to WSDL specification) will look like this (text content inside SOAP body)?
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xs="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body xsi:type="xs:string">value</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
That's edge case - in practice all java (axis1, axis2, cxf, jaxrpc-ri) implementations I've checked wrap String (or any simple) type with element named after part's name with no namespace.
Axis1:
private static void _initOperationDesc1(){
org.apache.axis.description.OperationDesc oper;
org.apache.axis.description.ParameterDesc param;
oper = new org.apache.axis.description.OperationDesc();
oper.setName("hello");
param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "arg1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
oper.addParameter(param);
oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
oper.setReturnClass(java.lang.String.class);
oper.setReturnQName(new javax.xml.namespace.QName("", "result"));
oper.setStyle(org.apache.axis.constants.Style.DOCUMENT);
oper.setUse(org.apache.axis.constants.Use.LITERAL);
_operations[0] = oper;
}
JAXRPC-RI:
SOAPBlockInfo _bodyBlock = new SOAPBlockInfo(ns1_hello_arg1_QNAME);
_bodyBlock.setValue(arg1);
_bodyBlock.setSerializer(ns2_myns2_string__java_lang_String_String_Serializer);
_request.setBody(_bodyBlock);
...
private static final javax.xml.namespace.QName ns1_hello_arg1_QNAME = new QName("", "arg1");
So you should get:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xs="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<arg1>value</arg1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
EDIT: Also in WSDL 2.0 there are no messages and operation inputs and outputs must refer to elements (or #any or #none or #other).