You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Christopher Carver <ch...@charter.net> on 2002/06/08 00:23:46 UTC

Type mapping is giving me some problems from stub code.

Howdy,

I'm trying to create some client code based on the stub code generated 
from WSDL2Java and I'm having a slight issue with this (de)serialization 
type mapping stuff and could use some help. I was under the impression 
that the client didn't have to worry about properly type mapping complex 
data types.

__First here is my client code:

package AddressBookStubCode;

public class AddressBookClient{
    public static void main(String [] args) throws Exception {
       
        // Make a service
        AddressBookStubCode.AddressBookService service =
            new AddressBookStubCode.AddressBookServiceLocator();
       
        //Make a stub from the service
        AddressBookStubCode.AddressBook addrStub = 
service.getAddressFetcher();
       
        //Create the data structures
        AddressBookStubCode.PhoneNumber phoneNumber = new           
 AddressBookStubCode.PhoneNumber();
        AddressBookStubCode.Address address = new 
AddressBookStubCode.Address();
        AddressBookStubCode.Address returnAddress = new 
AddressBookStubCode.Address();
       
        //Load in some data
        phoneNumber.setAreaCode(817);
        phoneNumber.setExchange("624");
        phoneNumber.setNumber("7117");
        address.setStreetNum(2520);
        address.setStreetName("Rodeo Plaza");
        address.setCity("Fort Worth");
        address.setState("TX");
        address.setZip(76106);
        address.setPhoneNumber(phoneNumber);
       
        //Making service calls
        addrStub.addEntry("Billy Bob's",address);
  }
}

___Now here is the error I'm getting when I run the client:

C:\TEMP>java AddressBookStubCode.AddressBookClient
Exception in thread "main" service 'urn:AddressBook' unknown
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
java:134)
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseri
alizationContextImpl.java:875)
        at 
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
        at 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLVa
lidator.java:1480)
        at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1204)
        at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(Deserializa
tionContextImpl.java:202)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:428)
        at org.apache.axis.client.Call.invoke(Call.java:1919)
        at org.apache.axis.client.Call.invoke(Call.java:1690)
        at org.apache.axis.client.Call.invoke(Call.java:1608)
        at org.apache.axis.client.Call.invoke(Call.java:1169)
        at 
AddressBookStubCode.AddressFetcherSoapBindingStub.addEntry(AddressFet
cherSoapBindingStub.java:127)
        at 
AddressBookStubCode.AddressBookClient.main(AddressBookClient.java:30)


C:\TEMP>


Thank you for any help that you can provide.