Hi Anne,

I am invoking wsdl2java in my ant build script as follows,

<target name="gen.wsdl.service">
                <taskdef     name="java2wsdl"
                                        
classname="org.apache.ws.java2wsdl.Java2WSDLTask"
                                        classpathref="axis.classpath"/>
                <java2wsdl   classname="com.cloverjcoverage.main.EnterShowroom"
                                        outputLocation="C:/stubs"
                                        
targetNamespace="http://cloverjcoverage.com/";
                                        
schemaTargetNamespace="http://cloverjcoverage.com/xsd";>
        
                                        <classpath>
                                                <pathelement 
path="${axis.classpath}"/>
                                                <pathelement 
location="${basedir}/bin"/>
                                        </classpath>
        
                </java2wsdl>
                <taskdef     name="wsdl2java"
                                        
classname="org.apache.axis2.tool.ant.AntCodegenTask"
                                        classpathref="axis.classpath"/>
                <wsdl2java   wsdlFilename="C:/stubs/EnterShowroom.wsdl"
                                        output="C:/stubs/"
                                        packageName="com.cloverjcoverage.main"
                                        language="java"
                                        databindingName="adb"
                                        synconly="true"
                                        serverside="true"
                                        serverSideInterface="true"
                                        
namespaceToPackages="http://cloverjcoverage.com/xsd=com.cloverjcoverage.main.adb.xsd";
                                        generateservicexml="true"/>
        </target>

On 2/14/07, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
I've raised this issue before, but it never seems to get resolved.
Note that the generated WSDL is document style, but the <soap:body>
definitions include a namespace attribute. This should not be the
case. The namespace attribute should be generated only for RPC style.

Meanwhile -- John -- can you tell us how you invoke wsdl2java?

Anne

On 2/14/07, John McCosker <[EMAIL PROTECTED]> wrote:
> Hi I have an ant script which generates a wsdl from a class I created,
> thw wsdl is generated fine.
>
> I then generate web service skeletons from the wsdl,
> of which I get this message,
>
> [wsdl2java] (Location of error
> unknown)org.apache.xml.utils.URI$MalformedURIException: Cannot
> initialize URI with empty parameters
> [wsdl2java] (Location of error
> unknown)org.apache.xml.utils.URI$MalformedURIException: Cannot
> initialize URI with empty parameters
>
> when I pull my generated classes into my ide I get these errors,
> Severity and Description        Path    Resource        Location        
Creation Time   Id
> The method fromOM(OMElement, Class<BuyCar>, Map) is undefined for the
> type EnterShowroomMessageReceiverInOut  
Axis_ant_generated/src/com/cloverjcoverage/main 
EnterShowroomMessageReceiverInOut.java  line
> 68      1171471798672   5859
>
> The method fromOM(OMElement, Class<GetInvoice>, Map) is undefined for
> the type EnterShowroomMessageReceiverInOut      
Axis_ant_generated/src/com/cloverjcoverage/main 
EnterShowroomMessageReceiverInOut.java  line
> 47      1171471798672   5857
>
> The method toEnvelope(SOAPFactory, BuyCarResponse, boolean) is
> undefined for the type
> EnterShowroomMessageReceiverInOut       
Axis_ant_generated/src/com/cloverjcoverage/main 
EnterShowroomMessageReceiverInOut.java  line
> 76      1171471798672   5860
>
> The method toEnvelope(SOAPFactory, GetInvoiceResponse, boolean) is
> undefined for the type
> EnterShowroomMessageReceiverInOut       
Axis_ant_generated/src/com/cloverjcoverage/main 
EnterShowroomMessageReceiverInOut.java  line
> 55      1171471798672   5858
>
>
> I have included the class i generated the wsdl from, and the wsdl itself,
> I don't have any xsd's should I? if so can I generate them, I'm a bit
> confused here.
>
> package com.cloverjcoverage.main;
>
> import com.cloverjcoverage.customer.Customer;
> import com.cloverjcoverage.dto.DTO;
> import com.cloverjcoverage.dto.DTOGolfGtiDetails;
> import com.cloverjcoverage.dto.DTOGolfPlusDetails;
> import com.cloverjcoverage.dto.DTOPassatDetails;
> import com.cloverjcoverage.dto.DTOPoloDetails;
> import com.cloverjcoverage.orders.Invoice;
> import com.cloverjcoverage.orders.MyInvoice;
> import com.cloverjcoverage.orders.MyOrder;
> import com.cloverjcoverage.orders.Order;
> import com.cloverjcoverage.specs.CustomSpec;
> import com.cloverjcoverage.specs.GolfGtiCustomSpec;
> import com.cloverjcoverage.specs.GolfPlusCustomSpec;
> import com.cloverjcoverage.specs.PassatCustomSpec;
> import com.cloverjcoverage.specs.PoloCustomSpec;
>
> public class EnterShowroom {
>
>         private String showroom;
>
>         public EnterShowroom(){
>
>         }
>
>         public EnterShowroom(String showroom){
>                 this.showroom=showroom;
>         }
>
>         private DTO selectCar(String car, boolean withCustomSpec){
>                 DTO dto = null;
>                 if(car.equals("Passat")){
>                         if(withCustomSpec){
>                                 dto = new 
DTOPassatDetails(createCustomSpec("Passat"));
>                         }else{
>                                 dto = new DTOPassatDetails();
>                         }
>                 }else if(car.equals("Golf Plus")){
>                         if(withCustomSpec){
>                                 dto = new 
DTOGolfPlusDetails(createCustomSpec("Golf Plus"));
>                         }else{
>                                 dto = new DTOGolfPlusDetails();
>                         }
>                 }else if(car.equals("Golf gti")){
>                         if(withCustomSpec){
>                                 dto = new DTOGolfGtiDetails(createCustomSpec("Golf 
gti"));
>                         }else{
>                                 dto = new DTOGolfGtiDetails();
>                         }
>                 }else{
>                         if(withCustomSpec){
>                                 dto = new 
DTOPoloDetails(createCustomSpec("Polo"));
>                         }else{
>                                 dto = new DTOPoloDetails();
>                         }
>                 }
>                 return dto;
>         }
>
>         private CustomSpec createCustomSpec(String car){
>
>                 if(car.equals("Passat")){
>                         PassatCustomSpec spec = new PassatCustomSpec();
>
>                         return spec;
>                 }else if(car.equals("Golf Plus")){
>                         GolfPlusCustomSpec spec = new GolfPlusCustomSpec();
>
>                         return spec;
>
>                 }else if(car.equals("Golf gti")){
>                         GolfGtiCustomSpec spec = new GolfGtiCustomSpec();
>
>                         return spec;
>
>                 }else if(car.equals("Polo")){
>                         PoloCustomSpec spec = new PoloCustomSpec();
>
>                         return spec;
>                 }else{
>                         return null;
>                 }
>         }
>
>         public MyInvoice getInvoice(DTO dto){
>                 //check the instance of the dto and return relative invoice
>                 MyInvoice invoice = new Invoice();
>                 invoice.init(dto);
>                 return invoice;
>         }
>
>         public MyOrder buyCar(String car,boolean spec){
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| INVOKING buyCar
> |||||||||||||||||||||||||||||||||||||||||||||");
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 Customer customer = new Customer();
>                 customer.setFirstName("John");
>                 customer.setLastName("McCosker");
>
>                 customer.setAddress("119 Sevenoaks, waterside, londonderry,
> Co.Londonderry, Northern Ireland");
>                 customer.setPostcode("BT47 6BD");
>                 customer.setPhone("07732785257");
>                 customer.setEmail("[EMAIL PROTECTED]");
>
>                 customer.setBillingAddress("119 Sevenoaks, waterside, 
londonderry,
> Co.Londonderry, Northern Ireland");
>                 customer.setBillingPostcode("BT47 6BD");
>                 customer.setBillingPhone("07732785257");
>                 customer.setBillingEmail("[EMAIL PROTECTED]");
>
>                 MyOrder order = new Order();
>                 //select car and add to order
>                 order.setCarDto(selectCar(car,spec));
>
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| RTRIEVEING CAR DTO
> ||||||||||||||||||||||||||||||||||||||||||");
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| Alloy mfr: " +
> order.getCarDto().getAlloyMfr());
>                 System.out.println("||||||||||| Alloy size: " +
> order.getCarDto().getAlloySize());
>                 System.out.println("||||||||||| Colour: " + 
order.getCarDto().getColor());
>                 System.out.println("||||||||||| Doors: " + 
order.getCarDto().getDoors());
>                 System.out.println("||||||||||| Engine size: " +
> order.getCarDto().getEngineSize());
>                 System.out.println("||||||||||| Top speed: " +
> order.getCarDto().getTopSpeed());
>                 System.out.println("||||||||||| 0-60: " + 
order.getCarDto().getZeroToSixty());
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("");
>                 System.out.println("");
>
>                 //create invoice and add to order
>                 MyInvoice invoice = getInvoice(order.getCarDto());
>
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| DTO FROM INVOICE
> ||||||||||||||||||||||||||||||||||||||||||");
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| Standard price: " +
> invoice.getStandardPrice());
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("");
>                 System.out.println("");
>
>                 invoice.setCustomer(customer);
>
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| CUSTOMER DETAILS FROM INVOICE
> |||||||||||||||||||||||||||||");
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| address: " +
> invoice.getCustomer().getAddress());
>                 System.out.println("||||||||||| billing addr: " +
> invoice.getCustomer().getBillingAddress());
>                 System.out.println("||||||||||| billing email: " +
> invoice.getCustomer().getBillingEmail());
>                 System.out.println("||||||||||| billing phone: " +
> invoice.getCustomer().getBillingPhone());
>                 System.out.println("||||||||||| billing postcode: " +
> invoice.getCustomer().getBillingPostcode());
>                 System.out.println("||||||||||| email: " + 
invoice.getCustomer().getEmail());
>                 System.out.println("||||||||||| first name: " +
> invoice.getCustomer().getFirstName());
>                 System.out.println("||||||||||| last name: " +
> invoice.getCustomer().getLastName());
>                 System.out.println("||||||||||| phone: " + 
invoice.getCustomer().getPhone());
>                 System.out.println("||||||||||| postcode: " +
> invoice.getCustomer().getPostcode());
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("");
>                 System.out.println("");
>
>                 order.setInvoice(invoice);
>
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| GET INVOICE FROM ORDER
> ||||||||||||||||||||||||||||||||||||");
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getAddress());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getBillingAddress());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getBillingEmail());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getBillingPhone());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getBillingPostcode());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getEmail());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getFirstName());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getLastName());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getPhone());
>                 System.out.println("||||||||||| " +
> order.getInvoice().getCustomer().getPostcode());
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("");
>                 System.out.println("");
>
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| GET STANDARD PRICE INVOICE 
FROM
> ORDER   |||||||||||||||||||||");
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| " + 
order.getInvoice().getStandardPrice());
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("");
>                 System.out.println("");
>
>                 
//System.out.println(order.getInvoice().getCustomer().getBillingAddress());
>
>                 order.setCustomer(customer);
>
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| GET CUSTOMER FROM ORDER
> |||||||||||||||||||||||||||||||||||");
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("||||||||||| " + 
order.getCustomer().getAddress());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getBillingAddress());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getBillingEmail());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getBillingPhone());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getBillingPostcode());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getEmail());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getFirstName());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getLastName());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getPhone());
>                 System.out.println("||||||||||| " + 
order.getCustomer().getPostcode());
>                 
System.out.println("-----------*---------------*-----------------*---------------------*-----");
>                 System.out.println("");
>                 System.out.println("");
>
>                 System.out.println("|||||||||| END PROCESSING");
>
>                 return order;
>         }
> }
>
> my wsdl,
>
> <wsdl:definitions xmlns:axis2="http://cloverjcoverage.com/";
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> xmlns:ns="http://cloverjcoverage.com/xsd";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> targetNamespace="http://cloverjcoverage.com/";><wsdl:types><xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:ax21="http://dto.cloverjcoverage.com/xsd";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://dto.cloverjcoverage.com/xsd";>
> <xs:element name="DTO" type="ax21:DTO" />
> <xs:complexType name="DTO">
> <xs:sequence>
> <xs:element name="alloyMfr" nillable="true" type="xs:string" />
> <xs:element name="alloySize" type="xs:int" />
> <xs:element name="color" nillable="true" type="xs:string" />
> <xs:element name="custom" type="xs:boolean" />
> <xs:element name="doors" type="xs:int" />
> <xs:element name="engineSize" type="xs:int" />
> <xs:element name="topSpeed" type="xs:int" />
> <xs:element name="zeroToSixty" type="xs:int" />
> </xs:sequence>
> </xs:complexType>
> </xs:schema><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:ax23="http://customer.cloverjcoverage.com/xsd";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://customer.cloverjcoverage.com/xsd";>
> <xs:element name="Customer" type="ax23:Customer" />
> <xs:complexType name="Customer">
> <xs:sequence>
> <xs:element name="address" nillable="true" type="xs:string" />
> <xs:element name="billingAddress" nillable="true" type="xs:string" />
> <xs:element name="billingEmail" nillable="true" type="xs:string" />
> <xs:element name="billingPhone" nillable="true" type="xs:string" />
> <xs:element name="billingPostcode" nillable="true" type="xs:string" />
> <xs:element name="email" nillable="true" type="xs:string" />
> <xs:element name="firstName" nillable="true" type="xs:string" />
> <xs:element name="lastName" nillable="true" type="xs:string" />
> <xs:element name="phone" nillable="true" type="xs:string" />
> <xs:element name="postcode" nillable="true" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:schema><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:ax25="http://dto.cloverjcoverage.com/xsd";
> xmlns:ax22="http://orders.cloverjcoverage.com/xsd";
> xmlns:ax24="http://customer.cloverjcoverage.com/xsd";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://orders.cloverjcoverage.com/xsd";>
> <xs:import namespace="http://customer.cloverjcoverage.com/xsd"; />
> <xs:import namespace="http://dto.cloverjcoverage.com/xsd"; />
> <xs:element name="MyInvoice" type="ax22:MyInvoice" />
> <xs:complexType name="MyInvoice">
> <xs:sequence>
> <xs:element name="customer" nillable="true" type="ax24:Customer" />
> <xs:element name="standardPrice" type="xs:int" />
> </xs:sequence>
> </xs:complexType>
> <xs:element name="MyOrder" type="ax22:MyOrder" />
> <xs:complexType name="MyOrder">
> <xs:sequence>
> <xs:element name="carDto" nillable="true" type="ax25:DTO" />
> <xs:element name="customer" nillable="true" type="ax24:Customer" />
> <xs:element name="invoice" nillable="true" type="ax22:MyInvoice" />
> </xs:sequence>
> </xs:complexType>
> </xs:schema><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> xmlns:ns0="http://dto.cloverjcoverage.com/xsd";
> xmlns:ns1="http://orders.cloverjcoverage.com/xsd";
> attributeFormDefault="qualified" elementFormDefault="qualified"
> targetNamespace="http://cloverjcoverage.com/xsd";>
> <xs:element name="getInvoice">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="dto" nillable="true" type="ns0:DTO" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="getInvoiceResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="ns1:MyInvoice" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="buyCar">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="car" nillable="true" type="xs:string" />
> <xs:element name="spec" nillable="true" type="xs:boolean" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="buyCarResponse">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="return" nillable="true" type="ns1:MyOrder" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema></wsdl:types><wsdl:message
> name="getInvoiceMessage"><wsdl:part name="part1"
> element="ns:getInvoice" /></wsdl:message><wsdl:message
> name="getInvoiceResponseMessage"><wsdl:part name="part1"
> element="ns:getInvoiceResponse" /></wsdl:message><wsdl:message
> name="buyCarMessage"><wsdl:part name="part1" element="ns:buyCar"
> /></wsdl:message><wsdl:message name="buyCarResponseMessage"><wsdl:part
> name="part1" element="ns:buyCarResponse"
> /></wsdl:message><wsdl:portType
> name="EnterShowroomPortType"><wsdl:operation
> name="getInvoice"><wsdl:input message="axis2:getInvoiceMessage"
> /><wsdl:output message="axis2:getInvoiceResponseMessage"
> /></wsdl:operation><wsdl:operation name="buyCar"><wsdl:input
> message="axis2:buyCarMessage" /><wsdl:output
> message="axis2:buyCarResponseMessage"
> /></wsdl:operation></wsdl:portType><wsdl:binding
> name="EnterShowroomSOAP11Binding"
> type="axis2:EnterShowroomPortType"><soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"; style="document"
> /><wsdl:operation name="getInvoice"><soap:operation
> soapAction="urn:getInvoice" style="document" /><wsdl:input><soap:body
> use="literal" namespace="http://cloverjcoverage.com/";
> /></wsdl:input><wsdl:output><soap:body use="literal"
> namespace="http://cloverjcoverage.com/";
> /></wsdl:output></wsdl:operation><wsdl:operation
> name="buyCar"><soap:operation soapAction="urn:buyCar" style="document"
> /><wsdl:input><soap:body use="literal"
> namespace="http://cloverjcoverage.com/";
> /></wsdl:input><wsdl:output><soap:body use="literal"
> namespace="http://cloverjcoverage.com/";
> /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding
> name="EnterShowroomSOAP12Binding"
> type="axis2:EnterShowroomPortType"><soap12:binding
> transport="http://schemas.xmlsoap.org/soap/http"; style="document"
> /><wsdl:operation name="getInvoice"><soap12:operation
> soapAction="urn:getInvoice" style="document"
> /><wsdl:input><soap12:body use="literal"
> namespace="http://cloverjcoverage.com/";
> /></wsdl:input><wsdl:output><soap12:body use="literal"
> namespace="http://cloverjcoverage.com/";
> /></wsdl:output></wsdl:operation><wsdl:operation
> name="buyCar"><soap12:operation soapAction="urn:buyCar"
> style="document" /><wsdl:input><soap12:body use="literal"
> namespace="http://cloverjcoverage.com/";
> /></wsdl:input><wsdl:output><soap12:body use="literal"
> namespace="http://cloverjcoverage.com/";
> /></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service
> name="EnterShowroom"><wsdl:port name="EnterShowroomSOAP11port"
> binding="axis2:EnterShowroomSOAP11Binding"><soap:address
> location="http://localhost:8080/axis2/services/EnterShowroom";
> /></wsdl:port><wsdl:port name="EnterShowroomSOAP12port"
> binding="axis2:EnterShowroomSOAP12Binding"><soap12:address
> location="http://localhost:8080/axis2/services/EnterShowroom";
> /></wsdl:port></wsdl:service></wsdl:definitions>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



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

Reply via email to