[ 
https://issues.apache.org/jira/browse/AXIS2-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486998
 ] 

Steven E. Harris commented on AXIS2-2471:
-----------------------------------------

I'd have to pull out much of the detail in my WSDL file before I could post it 
here. I'm sorry, but it makes references to project details that I can't make 
public. Also, it imports two other XML Schema files that I'd have to post too.

Instead, perhaps I can specify some aspects categorically.
The WSDL file looks like this, approximately:

<description xmlns="http://www.w3.org/ns/wsdl";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://www.w3.org/ns/wsdl 
http://www.w3.org/2007/03/wsdl/wsdl20.xsd";
   targetNamespace="http://myproject/2007/04/wsdl/patch-rx";
   xmlns:xs="http://www.w3.org/2001/XMLSchema";
   xmlns:tns="http://myprojectl/2007/04/wsdl/patch-rx";
   xmlns:prx="http://myproject/2007/04/schemas/patch-rx";
   xmlns:soap="http://www.w3.org/2003/05/soap-envelope";
   xmlns:wsoap="http://www.w3.org/ns/wsdl/soap";
   xmlns:wsdlx="http://www.w3.org/2006/01/wsdl-extensions";>
   <!--xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions"-->

   <types>
      <!-- xs:import ... -->
   </types>

   <interface name="task-orders">
  <!-- ... -->
   </interface>

   <interface name="patch-prescription">
  <!-- ... -->
   </interface>

   <binding name="task-orders-soap"
            interface="tns:task-orders"
            type="http://www.w3.org/2006/01/wsdl/soap";
            wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP";>
      <operation ref="tns:task-request"
                 
wsoap:mep="http://www.w3.org/2003/05/soap/mep/request-response"/>
      <fault ref="tns:unknown-machine-fault"
             wsoap:code="soap:Receiver"/>
   </binding>

   <binding name="patch-prescription-soap"
            interface="tns:patch-prescription"
            type="http://www.w3.org/2006/01/wsdl/soap";
            wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP";>
      <operation ref="tns:patch-rx"
                 
wsoap:mep="http://www.w3.org/2003/05/soap/mep/request-response"/>
      <fault ref="tns:unknown-machine-fault"
             wsoap:code="soap:Receiver"/>
   </binding>

   <service name="task-orders-service"
            interface="tns:task-orders">
      <endpoint name="task-orders-soap-endpoint"
                binding="tns:task-orders-soap"
                address="http://myproject/2007/04/task-orders"/>
   </service>

   <service name="patch-prescription-service"
            interface="tns:patch-prescription">
      <endpoint name="patch-prescription-soap-endpoint"
                binding="tns:patch-prescription-soap"
                address="http://myproject/2007/04/patch-rx"/>
   </service>
</description>


I invoke WSDL2Java as follows:

"${AXIS2_HOME}"/bin/wsdl2java.sh \
-uri patch-prescription-service/src/main/resources/myproject.wsdl \
-wv 2.0 \
-d jibx \
-Ebindingfile patch-prescription-service/src/main/resources/binding.xml \
-S ./patch-prescription-service/src/main/java \
-R ./patch-prescription-service/src/main/resources \
-sn patch-prescription-service


Regardless of which data binding option I use, or whether I specify "-uw" for 
an unwrapped interface, it's only the first service in the WSDL file that gets 
generated. If I edit the WSDL file, swapping the two service definitions, and 
run wsdl2java again with the same parameters, a different service gets 
generated -- the one that's now first in the file.

Do I need to be qualifying the service name with a namespace prefix?

> WSDL2Java ignores "-sn" service name selector and generates first service only
> ------------------------------------------------------------------------------
>
>                 Key: AXIS2-2471
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2471
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: nightly
>         Environment: N/A
>            Reporter: Steven E. Harris
>
> The wsdl2java.(sh|bat) programs accept an "-sn" argument to specify a 
> particular service name within a WSDL file for which to generate sources. The 
> program (as of the 4 April 2007) ignores this argument and generates source 
> for only the first service mentioned in the file. It should honor the "-sn" 
> specification and generate source for that particular service, reporting an 
> error if no such service exists in the WSDL file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to