Hi,

I found an issue in my jibx binding file .. this resolved strange existance
of "xmlns:ns2="http://Customer <http://customer/>" and i know only have the
correct namespace which is set in jibx appearing in the wsdl.

Before:
<namespace prefix="xmlns"
uri="http://www.thewg.com/schemas/customer/customer.xsd
"/>

After:
<namespace uri="http://www.thewg.com/schemas/customer/customer.xsd "
default="ëlements"/>

Just ONE issue left.  The message element in the WSDL is generating as
follows:

<wsdl:message name="echo1Response">
   <wsdl:part name="Customer" element="ns1:customer"/>
</wsdl:message>

When it should be producing something like this:

<wsdl:message name="echo1Response">
   <wsdl:part name="customer" type="ns1:Customer"/>
</wsdl:message>

Am i do something wrong or do i need always have a element in my schemas?
The xfire jibx page doesnt mention the need for this...?

Any ideas?

Thanks!

On 3/26/07, Daniel Feist <[EMAIL PROTECTED]> wrote:

Hi.

I am having issues with the namespaces in the generated wsdl when using
jibx with xfire.  What ever Ï do a default "xmlns:ns2="http://Customer " is
added to my wsdl namespaces and the wsdl message parts reference this
namespace rather than the correct one.

Anyone got any ideas what I can do to resolve this problem?

many thanks.

Schema:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns="http://www.thewg.com/schemas/customer/customer.xsd";
targetNamespace="http://www.thewg.com/schemas/customer/customer.xsd";>
      <xs:complexType name="Customer">
        <xs:sequence>
          <xs:element name="street" type="xs:string" />
          <xs:element name="city" type="xs:string" />
          <xs:element name="city" type="xs:string" />
          <xs:element name="state" type="xs:string" />
          <xs:element name="zip" type="xs:string" />
          <xs:element name="phone" type="xs:string" />
          <xs:element name="test" type="xs:int" />
        </xs:sequence>
      </xs:complexType>
</xs:schema>

Class:
public class Customer {
    public String street;
    public String city;
    public String state;
    public Integer zip;
    public String phone;

    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    public String getStreet() {
        return street;
    }
    public void setStreet(String street) {
        this.street = street;
    }
    public Integer getZip() {
        return zip;
    }
    public void setZip(Integer zip) {
        this.zip = zip;
    }
}

Binding:
<binding>
<namespace prefix="xmlns" 
uri="http://www.thewg.com/schemas/customer/customer.xsd
"/>
  <mapping name="customer" class="Customer">
    <value name="street" field="street"/>
    <value name="city" field="city"/>
    <value name="state" field="state"/>
    <value name="zip" field="zip"/>
    <value name="phone" field="phone"/>
  </mapping>
</binding>

Service:
IServiceA
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult ;
import javax.jws.WebService;

@WebService(name = "IServiceA", targetNamespace = "
http://www.thewg.com/schemas/customer/customer.xsd ")

public interface IServiceA {

    @WebMethod
    public @WebResult(name="customer", 
targetNamespace="http://www.thewg.com/schemas/customer/customer.xsd
")Customer echo1(@WebParam(name="customer", targetNamespace="
http://www.thewg.com/schemas/customer/customer.xsd";)Customer a);

}

ServiceA
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

@WebService(endpointInterface = "IServiceA", serviceName =
"CustomerService", targetNamespace="
http://www.thewg.com/schemas/customer/customer.xsd";)
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public class ServiceA implements IServiceA{

    public Customer echo1(Customer a){
        return a;
    }

WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.muleumo.org"; xmlns:tns="
http://www.muleumo.org"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"; 
xmlns:ns1="http://www.thewg.com/schemas/customer/customer.xsd";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"; 
xmlns:ns2="http://Customer
" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
">
  <wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns="http://www.thewg.com/schemas/customer/customer.xsd";
targetNamespace="http://www.thewg.com/schemas/customer/customer.xsd";>
      <xs:complexType name="Customer">
        <xs:sequence>
          <xs:element name="street" type="xs:string"/>
          <xs:element name="city" type="xs:string"/>
          <xs:element name="city" type="xs:string"/>
          <xs:element name="state" type="xs:string"/>
          <xs:element name="zip" type="xs:string"/>
          <xs:element name="phone" type="xs:string"/>
          <xs:element name="test" type="xs:int"/>
        </xs:sequence>
      </xs:complexType>
</xs:schema>
  </wsdl:types>
  <wsdl:message name="echo1Response">
    <wsdl:part name="customer" element="ns2:customer"/>
  </wsdl:message>
  <wsdl:message name="echo1Request">
    <wsdl:part name="customer" element="ns2:customer"/>
  </wsdl:message>
  <wsdl:portType name="IServiceA">
    <wsdl:operation name="echo1">
      <wsdl:input name="echo1Request" message="tns:echo1Request"/>
      <wsdl:output name="echo1Response" message="tns:echo1Response"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceALocalBinding" type="tns:IServiceA">
    <wsdlsoap:binding style="document"
transport="urn:xfire:transport:local"/>
    <wsdl:operation name="echo1">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="echo1Request">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="echo1Response">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ServiceAHttpBinding" type="tns:IServiceA">
    <wsdlsoap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="echo1">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="echo1Request">
        <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="echo1Response">
        <wsdlsoap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ServiceA">
    <wsdl:port name="ServiceAMulePort" binding="tns:ServiceAHttpBinding">
      <wsdlsoap:address location=" http://127.0.0.1:80/services/ServiceA
"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>



Reply via email to