Take as an example <element name="UserRecord"> <complexType abstract="false" block="" mixed="false">
<all minOccurs="1" maxOccurs="1"> <element name="id" type="string"></element> <element name="num_input" type="int"></element> <element name="num_dates" type="int"></element> <element name="full_name" type="string"></element> <element name="default_comment" type="string"></element> <element name="expense_gui" type="string"></element> <element name="time_gui" type="string"></element> <element name="mileage_gui" type="string"></element> <element name="domain" type="string"></element> </all> </complexType> </element> You first need to have a Java class into which to read this and/or from which to write this. The easiest thing is to follow the Java Bean pattern, so that you can use Apache SOAP's BeanSerializer. A simple class would be public class UserRecord { public String id; public int num_input; public int num_dates; public String full_name; public String default_comment; public String expense_gui; public String time_gui; public String mileage_gui; public String domain; } You then supply a type mapping to associate the schema type with the Java type SOAPMappingRegistry smr = new SOAPMappingRegistry(); BeanSerializer beanSer = new BeanSerializer(); // Map the types. smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://www.journyx.com/jxapi", "UserRecord"), UserRecord.class, beanSer, beanSer); ... // Build the call. Call call = new Call(); call.setSOAPMappingRegistry(smr); ... Scott Nichol ----- Original Message ----- From: "Justin F. Knotzke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 02, 2002 3:14 PM Subject: Journyx API > > Hi, > > I am trying to write a Java client that talks to the Journyx > timesheet: http://www.journyx.com > > They offer a SOAP Service to access the API set. I am able to login > and call various methods however there are several that use structs and > I am unable to make calls to those methods (usually resulting in > something like: > > [SOAPException: faultCode=SOAP-ENV:Client; msg=No mapping found for > 'http://soapinterop.org/xsd:SOAPStruct' using encoding style > 'http://schemas.xmlsoap.org/soap/encoding/'.; > targetException=java.lang.IllegalArgumentException: No mapping found for > 'http://soapinterop.org/xsd:SOAPStruct' using encoding style > 'http://schemas.xmlsoap.org/soap/encoding/'.] > > Journyx however does publish at the end of their API documentation a > XML Record Schema. > > My question is, how do I incorporate this XML schema into my Java > client? > > Thanks > Justin > > > -- > Justin F. Knotzke > [EMAIL PROTECTED] > http://www.shampoo.ca > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>