users@jax-rpc.java.net

Re: JAX-RPC wscompile modeler error

From: Anne Thomas Manes <atmanes_at_gmail.com>
Date: Tue, 15 Mar 2005 14:19:21 -0500

One problem I see is that you are importing the same namespace twice,
which is invalid. If you need to import two schema files into the same
namespace, then you must use <include> rather than <import>. Change
your <types> section to this:

   <wsdl:types>
      <xs:schema
          targetNamespace="http://www.opentravel.org/OTA/2003/05"
          xmlns:xs="http://www.w3.org/2001/XMLSchema" >
         <xs:annotation>
            <xs:documentation xml:lang="en">
               This schema defines all valid XML documents for the
Trust Voyager Reservation Service.
            </xs:documentation>
         </xs:annotation>
         <xs:include
schemaLocation="http://www.trustinternational.com/xml/OTA/2003/05/OTA_PingRQ.xsd"/>
         <xs:include
schemaLocation="http://www.trustinternational.com/xml/OTA/2003/05/OTA_PingRS.xsd"/>
          <xs:import
namespace="http://www.trustinternational.com/xml/reservation/2005/3"
schemaLocation="http://www.trustinternational.com/xml/reservation/2005/3/reservation.xsd"/>
          </xs:schema>
   </wsdl:types>

Notice that I changed your targetNamespace to the OTA namespace. Since
you aren't defining any additional elements or types, there's no
reason to create yet another namespace. You may want to change the
documentation element to more accurately reflect what you're doing --
including the two OTA schemas and importing the Trust International
reservations document structures.

You also need to remove all the namespace attributes from your
<wsdlsoap:body> definitions in the <binding>. (You only specify a
namespace in the binding when using RPC style services.) For example:

  <wsdl:binding name="ReservationServiceSoapBinding"
        type="resServ:ReservationServicePortType">
    <wsdlsoap:binding style="document"
        transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="uploadReservation">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="uploadReservationRequest">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="uploadReservationResponse">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
      ...
</wsdl:binding>

Anne

On 15 Mar 2005 10:04:42 +0000, Thilo Frotscher
<tfrotscher_at_trustinternational.com> wrote:
> Hi,
>
> I am using JWSDP 1.5 and have a problem with the wscompile tool.
> The tool reports the following error message:
>
> error: modeler error: model error: undeclared namespace prefix: ""
>
> I start wscompile using the following command:
>
> wscompile.sh -gen:client ReservationService.config
>
> (-f:novalidation does not help)
>
> The file ReservationService.config looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
> <wsdl
> location="http://localhost:7001/ws/services/ReservationService?wsdl"
> packageName="testPkg" />
> </configuration>
>
> The WSDL is attached to this email. What am I doing wrong?
> Please help!
>
> Thank you very much,
> Thilo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
>