Czesc,

I don't want to change wsdl from "wrapped" to "bare". As far as I am
concerned wsdl is the same, it is a parameter style of generated code
which I would like to control. In case of bare i see one argument
which corresponds to the complex type, in case of wrapped i see a
number of parameters (example below).
If I change the annotation, i would also have to change the
stub/skeleton by hand anyway :-(


Here is what comes out as wrapped sayHello:

public interface HelloService {
   public String sayHello(
       String toWho,
       String second)
       throws HelloFaultMessage;
}



And alternative "bare" triggered by violating naming convention for response:

public interface HelloService {
   public SayHelloResponse sayHello(
       HelloRequest sayHello)
       throws HelloFaultMessage;
}


The attached wsdl has the "bare" trigger. In order to switch back to
"wrapped" remove "_" from sayHelloResponse

I took a peek at wsgen code. Would you accept a patch to wsgen to add
a "force bare" flag?

--
Pawel


On 2/12/07, Tomek Sztelak <[EMAIL PROTECTED]> wrote:
Czesc

Hmm, maybe generate client code just as wsgen do it and then change
service annotation to bare value. Then you have document/literal
(bare) client and server stub. In next step you can just run the
server stub and XFire will generate document/literal ( bare ) wsdl for
you.


On 2/12/07, Pawel Jasinski <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a wsdl which conforms to wrapped style.
> Is there a way to force wsgen to generate code with bare parameter style?
> I have tried the following:
>
> <wsdl:definitions name="hello"
> targetNamespace="http://services.something.org/hello";
>   ...>
>   <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";>
>       <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
>   </jaxws:bindings>
>   ...
> </wsdl:definitions>
>
> It seems to control the wsimport (jaxws), but not the wsgen.
>
>
> Thanks
> Pawel
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
pj
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="hello" targetNamespace="http://services.something.org/hello";
  xmlns="http://services.something.org/hello";
  xmlns:tns="http://services.something.org/hello"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xs="http://www.w3.org/2001/XMLSchema";
  >
  
  <!-- customizations with global scope below it shows the default customizations -->
  <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";>
      <jaxws:enableWrapperStyle>false</jaxws:enableWrapperStyle>
  </jaxws:bindings>
  
  <wsdl:types>
    <xs:schema targetNamespace="http://services.something.org/hello";
      xmlns:tns="http://services.something.org/hello"; 
      xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
      jaxb:version="2.0" 
      xmlns="http://services.something.org/hello"; 
      version="1.0" elementFormDefault="qualified">
      <xs:annotation>
        <xs:documentation>Hello Service Contract XML Schema</xs:documentation>
      </xs:annotation>

      <xs:element name="sayHello" type="tns:helloRequest"/>

      <xs:complexType name="helloRequest">
        <xs:sequence>
          <xs:element name="toWho" type="xs:string" />
          <xs:element name="second" type="xs:string" />
        </xs:sequence>
      </xs:complexType>

      <xs:element name="_sayHelloResponse" type="tns:sayHelloResponse"/>
      <xs:complexType name="sayHelloResponse">
        <xs:sequence>
          <xs:element name="greeting" type="xs:string" />
        </xs:sequence>
      </xs:complexType>
      
      <xs:element name="HelloFault">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="shortErrorMessage" type="xs:string" />
            <xs:element name="techImplementationDetails" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>For example a Stacktrace</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="HelloRequestMessage">
    <wsdl:part name="helloRequestName" element="tns:sayHello" />
  </wsdl:message>
  <wsdl:message name="sayHelloResponse">
    <wsdl:part name="sayHelloResponse" element="tns:_sayHelloResponse" />
  </wsdl:message>
  <wsdl:message name="HelloFaultMessage">
    <wsdl:part name="HelloFaultPart" element="tns:HelloFault" />
  </wsdl:message>
  <wsdl:portType name="HelloService">
    <wsdl:operation name="sayHello">
      <wsdl:input message="tns:HelloRequestMessage" />
      <wsdl:output message="tns:sayHelloResponse" />
      <wsdl:fault name="HelloFaultFault" message="tns:HelloFaultMessage" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="HelloHttpBinding" type="tns:HelloService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"; />
    <wsdl:operation name="sayHello">
      <soap:operation soapAction="sayHello" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="HelloFaultFault">
        <soap:fault name="HelloFaultFault" use="literal" />
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="HelloService">
    <wsdl:port name="HelloHttpPort" binding="tns:HelloHttpBinding">
      <soap:address location="http://localhost/hello/HelloService"; />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to