Skip to main content

JaxWS WSDL customization

2 replies [Last post]
stas
Offline
Joined: 2005-04-04
Points: 0

I'm using the start-from-java approach to develop a webservice , that will be published to WebLogic 10.3.6.
I'm using standart annotations (@WebService .. ect`) to define a WS Beans , methods and Types.
I'm using a JWSC ant task to generate the deployable service and clientgen ant task to generate client artefacts.

The output is (as expected) fine , but I have certain restrictions upon the generated WSDL file , which I can't find the solution for. I've tried to play around with binding xml file , but the changes are applied only to the generated client artefacts .
The restrictions are :

1.

the schema import has to define a targetNamespace="" element

<xsd:schema>
      <xsd:import namespace="http://stas.asd.com" schemaLocation="CopyOfCopyOfWithInterfaceService_schema1.xsd"/>
    </xsd:schema>

although the targetNamespace element is specified is the xsd schema file



2.

The message part

<input message="**tns:get**"/>
      <output message="tns:getResponse"/>

has to have the naming convention of `*Request`
Annotating the parameter with `@WebParam(name="someRequest")` didn't change the message part in the wsdl , but instead in the xsd schema file .

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rwi
Offline
Joined: 2012-11-05
Points: 0

could you show the signature of the appropriate method? with all annotations...

stas
Offline
Joined: 2005-04-04
Points: 0

package com.example.common.interfaces;
</pre>
<pre>import javax.jws.WebMethod;

import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.xml.ws.RequestWrapper; import com.example.common.datatypes.two.ComplexInput;
import com.example.common.datatypes.two.ComplexOutput;
import com.sun.xml.ws.developer.SchemaValidation; @WebService(targetNamespace="http://stas.asd.com")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL,
parameterStyle=SOAPBinding.ParameterStyle.WRAPPED )
</pre>
<pre>@SchemaValidation

public interface CopyOfCopyOfIWithInterfacePortType { @WebMethod(operationName="getComplexType")
@WebResult(name="getComplexTypeResponse",targetNamespace="http://stas.asd.com")
public ComplexOutput getComplexType(  @WebParam(name="getComplexTypeRequest",targetNamespace="http://stas.asd.com") ComplexInput argument );
</pre>
<pre>}