[xgws-user] XSUL Dynamic Invoker Problem with .NET

Andre P. andre.p.piazza_at_gmail.com
Tue, 7 Nov 2006 16:39:34 -0200


------=_Part_10663_7400791.1162924774231
Content-Type: multipart/alternative; 
	boundary="----=_Part_10664_32372029.1162924774231"

------=_Part_10664_32372029.1162924774231
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello Alek! Sorry for taking so long to reply you, I had some trouble with
my computer!
Well, I inserted your code snippet... :
 {
           WSIFMessageElement inputMessage =3D ((WSIFMessageElement)in);
           XmlNamespace ns =3D inputMessage.getNamespace();
           inputMessage.addElement(ns, "item").addChild("keyboard");
}

... and the things worked fine now with my service.
But it's not Dynamic (and WSD independent) anymore, isn't it? Because my
code is now specific to my getPrice webservice, if I use another WSDL, it's
not going to work right? The "keyboard" part it's ok, I can substitute with
args[2], but the "item" is a specific thing from my WSDL and cannot be used
in another service (which will have another input message).


Still on the WSDL, I totally agree with you about the optional input messag=
e
(doesn't make any sense to me either!), but the strange thing is that the
WSDL was automatically generated by .NET framework when I attach a ?WSDL in
the end of the endpoint: http://localhost/GetPrice/Service.asmx. I'm
attaching (as a file now :) ) my .cs code for the .NET WService that
generates that WSDL for you to take a look and see if something is wrong!

Thanks again for your useful help!

Best regards,

Andre



On 10/31/06, Aleksander Slominski <aslom_at_cs.indiana.edu> wrote:
>
> hi Andre,
>
> please when you send WSDL to use for testing send it as attachment - i
> had to do plenty of editing to get working WSDL to reproduce the problem.
>
> more below.
>
> Andr=E9 Piazza wrote:
> > Hello list!
> >
> > I got the latest xsul library(2.7.9), and everything is working fine
> > when dynamic invoking some web services (deployed in axis, phpnusoap,
> > websphere), except for the document/literal wrapped .NET Web Services.
> >
> > With the logging utility enabled, I can see that the SOAP envelope is
> > not sending the parameters correctly when the service is in .NET!
> >
> > My args are http://localhost/GetPrice/Service.asmx?WSDL  getPrice
> > keyboard
> >
> > The envelope is incorrect (in bold), the value of "item" is not
> > included (should be <item>keyboard</item> isn't it?).
> your schema has elementFormDefault =3D"*qualified*" so item has to be in
> schema namespace as it is
> > I'm also attaching the .wsdl of the .NET service, and the .java of
> > xsul dynamic invoker (without the selftest and stuff).
> your input message (getPriceSoapIn) is <item> and you have it optional
> (?!) - that is what is sent when getPrice operation is used - it does
> not really make sense to me .as it is generally required to have _some_
> input message - i have seen empty input and return message but still
> there was some message and never optional ...
>
> instead i think you should define getPrice  element and have optional
> item inside - see attached WSDL to see it.
>
> the input parameter is optional so it can not be set by
> XsulDynamicInvoker (DII is really simple command line tester to show API
> but more sophisticated command line options would be required to support
> XML as input, optional parameters etc) still you can force setting it by
> adding right element to input message - for example (you could modify
> command line parsing logic to support name=3Dvalue to set it):
>
>         {
>             WSIFMessageElement inputMessage =3D ((WSIFMessageElement)in);
>             XmlNamespace ns =3D inputMessage.getNamespace(); // it is
> qualified - children element must have namespace
>             inputMessage.addElement(ns, "item").addChild("keyboard");
>         }
>
> best,
>
> alek
>
> ps. here is modified DII i used and below is output
>
> /* -*- mode: Java; c-basic-offset: 4; indent-tabs-mode: nil; -*-
> //------100-columns-wide------>|*/
> /*
> * Copyright (c) 2005 Extreme! Lab, Indiana University. All rights
> reserved.
> *
> * This software is open source. See the bottom of this file for the
> licence.
> *
> * $Id: XsulDynamicInvoker.java,v 1.5 2006/05/24 06:50:10 aslom Exp $
> */
>
> package xsul.dii;
>
> import java.io.File;
> import java.net.URI;
> import java.util.Iterator;
> import java.util.List;
> import javax.xml.namespace.QName;
> import org.xmlpull.v1.builder.XmlElement;
> import org.xmlpull.v1.builder.XmlInfosetBuilder;
> import org.xmlpull.v1.builder.XmlNamespace;
> import xsul.MLogger;
> import xsul.XmlConstants;
> import xsul.wsdl.WsdlBindingOperation;
> import xsul.wsdl.WsdlDefinitions;
> import xsul.wsdl.WsdlMessage;
> import xsul.wsdl.WsdlPortTypeOperation;
> import xsul.wsdl.WsdlResolver;
> import xsul.wsif.WSIFException;
> import xsul.wsif.WSIFMessage;
> import xsul.wsif.WSIFOperation;
> import xsul.wsif.WSIFPort;
> import xsul.wsif.WSIFService;
> import xsul.wsif.WSIFServiceFactory;
> import xsul.wsif.impl.WSIFMessageElement;
> import xsul.wsif.spi.WSIFProviderManager;
>
> public class XsulDynamicInvoker {
>     private final static MLogger logger =3D MLogger.getLogger();
>     private final static XmlInfosetBuilder builder =3D XmlConstants.BUILD=
ER;
>
>     private static void usage(String errMsg) {
>         System.err.println("Usage: {WSDL URL} {operation name}
> [parameters ...]");
>     }
>
>     public static void main(String[] args) throws Exception
>     {
>         System.err.println("Starting
> "+XsulDynamicInvoker.class.getName());
>         WSIFProviderManager.getInstance().addProvider( new
> xsul.wsif_xsul_soap_http.Provider() );
>
>         if(args.length > 0 && args[0].equals("selftest")) {
>             String GOOGLE_KEY =3D "google.key";
>             String googleKey =3D System.getProperty(GOOGLE_KEY);  //
>             if(googleKey !=3D null) {
>                 runClient(new String[]{
>                             "http://api.google.com/GoogleSearch.wsdl",
>                                 "doGoogleSearch", googleKey, "alek",
>                                 "0", "10", "false", "", "false", "",
> "latin1", "latin1"});
>             } else {
>                 System.err.println("Warning: pass your your google api
> key as -D"+GOOGLE_KEY+"=3DXXXXXX");
>             }
>
>             //2005-01-17 error 200 OK body=3D"" Content-Type: text/html
>             //runClient(new String[]{
>             //            "http://www.ghettodriveby.com/soap/?wsdl",
> "getRandomGoogleSearch", "aleksander slominksi"});
>
>
>             runClient(new String[]{
>
> "http://www.xmethods.net/sd/2001/BabelFishService.wsdl", "BabelFish",
>                             "en_fr", "I'm going to the beach."});
>             runClient(new String[]{
>
> "http://www.webservicex.net/ValidateEmail.asmx?wsdl", "IsValidEMail",
> "aleksander_at_example.com"});
>
>             runClient(new String[]{
>
> "http://www.xmethods.net/sd/2001/TemperatureService.wsdl", "getTemp",
> "02067"});
>             // java.io.IOException: Server returned HTTP response code:
> 502 for URL:
> http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl
>             //          runClient(new String[]{
>             //
> "http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl",
>             //                            "getQuote", "IBM"});
>             runClient(new String[]{
>
> "http://mssoapinterop.org/asmx/xsd/round4XSD.wsdl", "echoString", "Hello
> World!!!"});
>             runClient(new String[]{
>
> "
> http://samples.gotdotnet.com/quickstart/aspplus/samples/services/MathServ=
ice/VB/MathService.asmx?WSDL
> ",
>                             "Add", "3", "4"});
>             runClient(new String[]{  //sometimes timeout
>
> "http://www.webservicex.net/stockquote.asmx?WSDL", "GetQuote", "IBM"});
>             //            runClient(new String[]{  //FAILING - cant find
> WSDL
>             //
> "http://developerdays.com/cgi-bin/tempconverter.exe/wsdl/ITempConverter",
> "CtoF", "32"});
>             runClient(new String[]{
>                         "http://www.webservicex.net/icd10.asmx?WSDL",
> "GetICD10", "foo"});
>             //simple http://www.ghettodriveby.com/soap/?wsdl
>             //wsdl:import test
> http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl
>             runClient(new String[]{
>
> "http://ws.netviagens.com/webservices/AirFares.asmx?wsdl", "GetFares",
>                             "", "JFK", "WAW", "2005-01-20", "2005-02-02"
> });
>         } else {
>             runClient(args);
>         }
>     }
>
>     private static void runClient(String[] args) throws Exception {
>         //args[0] =3D
>         URI base =3D ((new File(".")).toURI());
>
>         if(args.length < 2) {
>             usage("at least two argument required");
>         }
>
>         String wsdlLoc =3D args[0];
>         //System.out.println("loaded def=3D"+def);
>
>         String opName =3D args[1];
>         String portName =3D null;
>         if(opName.charAt(0) =3D=3D '{') {
>             int pos =3D opName.indexOf('}');
>             portName =3D opName.substring(1, pos);
>             opName =3D opName.substring(pos+1);
>         }
>
>         //System.out.println("invoking Google WS with query '"+query+"'
> using WSDL from "+wsdlLoc);
>         System.err.println("invoking operation '"+opName+"' using WSDL
> from "+wsdlLoc);
>
>         //MLogger.setCmdNames(":ALL");
>         WsdlDefinitions def =3D WsdlResolver.getInstance().loadWsdl(base,
> new URI(wsdlLoc));
>
>         WSIFServiceFactory wsf =3D WSIFServiceFactory.newInstance();
>         WSIFService serv =3D wsf.getService(def);
>
>         WSIFPort port =3D serv.getPort(portName);
>
>         WSIFOperation op =3D port.createOperation(opName);
>         WSIFMessage in =3D op.createInputMessage();
>
>
>         WsdlBindingOperation bindingOp =3D  op.getBindingOperation();
>         WsdlPortTypeOperation portTypeOp =3D bindingOp.lookupOperation();
>         WsdlMessage inputMsg =3D portTypeOp.getInput().lookupMessage();
>         Iterator partNames =3D in.partNames().iterator();
>
>         //WSDL URL =3D - =3D=3D> read from stdin
>         //allow arguments:
>         //1. [position=3D]value only allowed as first arguments if
> position not specified (this is POSITIONAL!)
>         //    position 1...
>         //2. name=3Dvalue
>         //4. [name]=3D<xml>value
>         //
>
>         //-Depr=3D- =3D=3D> read from stdin
>         //-Dselect=3D"XPATH filter"
>
>         //process arguments
>         // deal with stupid element=3D wrapping and other stuff (special
> case for one part hat is element) ...
>
>
>         //        for (int i =3D 2; i < args.length; i++) {
>         //            //determine type of argument
>         //            String partName =3D (String) partNames.next();
> //partNames.get(i-2);
>         //            String partValue =3D args[i];
>         //            System.err.println(partName+"=3D"+partValue);
>         //            in.setObjectPart(partName, partValue);
>         //        }
>
>         int count =3D 2;
>         while(partNames.hasNext()) {
>             //determine type of argument
>             String partName =3D (String) partNames.next();
> //partNames.get(i-2);
>             if(count < args.length) {
>                 String partValue =3D args[count];
>                 System.err.println(partName+"=3D"+partValue);
>                 in.setObjectPart(partName, partValue);
>             } else {
>                 // will try to do some defaulting
>                 QName type =3D
> ((WSIFMessageElement)in).getPartType(partName);
>
>                 String localPart =3D type.getLocalPart();
>                 if("string".equals(localPart)) {
>                     String DEFAULT_STRING =3D "foo string";
>                     in.setObjectPart(partName, DEFAULT_STRING);
>                     System.err.println("defaulting
> "+partName+"=3D"+in.getObjectPart(partName));
>                 } else if("anyURI".equals(localPart)) {
>                     String DEFAULT_URI =3D "gsiftp://rainier//tmp/foo.txt=
";
>                     in.setObjectPart(partName, DEFAULT_URI);
>                     System.err.println("defaulting
> "+partName+"=3D"+in.getObjectPart(partName));
>                 } else if("URIArrayType".equals(localPart)) {
>                     XmlElement arrayEl =3D builder.newFragment(partName);
>                     String DEFAULT_URI_ARRAY_ITEM =3D
> "gsiftp://rainier//tmp/foo.txt";
>
> arrayEl.addElement("value").addChild(DEFAULT_URI_ARRAY_ITEM);
>                      in.setObjectPart(partName, arrayEl);
>                     System.err.println("defaulting
> "+partName+"=3D"+in.getObjectPart(partName));
>                 }
>             }
>
>             ++count;
>         }
>
>         {
>             WSIFMessageElement inputMessage =3D ((WSIFMessageElement)in);
>             XmlNamespace ns =3D inputMessage.getNamespace(); // it is
> qualified - children element must have namespace
>             inputMessage.addElement(ns, "item").addChild("keyboard");
>         }
>         //        in.setObjectPart("key", key);
>         //        in.setObjectPart("q", query);
>         //        in.setObjectPart("start", "0");
>         //        in.setObjectPart("maxResults", "10");
>         //        in.setObjectPart("filter", "true");
>         //        //restrict xsi:type=3D"xsd:string"
>         //        in.setObjectPart("safeSearch", "false");
>         //        //lr xsi:type=3D"xsd:string"
>         //        in.setObjectPart("ie", "latin1");
>         //        in.setObjectPart("oe","latin1");
>         if(op.isRequestResponseOperation()) {
>             WSIFMessage out =3D op.createOutputMessage();
>             WSIFMessage fault =3D op.createFaultMessage();
>             boolean succes =3D op.executeRequestResponseOperation(in, out=
,
> fault);
>             if(succes) {
>                 System.err.println("received response "+out);
>             } else {
>                 System.err.println("received fault "+fault);
>             }
>         } else {
>             op.executeInputOnlyOperation(in);
>             System.out.println("input only message was sent
> successfully");
>         }
>     }
>
>     private static void addListOfElementNames(XmlElement sequenceEl,
> List partNames) {
>         for(Iterator ei =3D
> sequenceEl.requiredElementContent().iterator(); ei.hasNext(); ) {
>             XmlElement xsdSomething =3D (XmlElement) ei.next();
>             if(! xsdSomething.getName().equals("element")) {
>                 throw new WSIFException("only xsd:element is supported
> in xsd:sequence");
>             }
>             String name =3D xsdSomething.getAttributeValue(null, "name");
>             logger.fine("adding sequence element name=3D"+name);
>             partNames.add(name);
>         }
>
>     }
>
>
> }
>
> /*
> * Indiana University Extreme! Lab Software License, Version 1.2
> *
> * Copyright (c) 2002-2005 The Trustees of Indiana University.
> * All rights reserved.
> *
> * Redistribution and use in source and binary forms, with or without
> * modification, are permitted provided that the following conditions are
> * met:
> *
> * 1) All redistributions of source code must retain the above
> *    copyright notice, the list of authors in the original source
> *    code, this list of conditions and the disclaimer listed in this
> *    license;
> *
> * 2) All redistributions in binary form must reproduce the above
> *    copyright notice, this list of conditions and the disclaimer
> *    listed in this license in the documentation and/or other
> *    materials provided with the distribution;
> *
> * 3) Any documentation included with all redistributions must include
> *    the following acknowledgement:
> *
> *      "This product includes software developed by the Indiana
> *      University Extreme! Lab.  For further information please visit
> *      http://www.extreme.indiana.edu/"
> *
> *    Alternatively, this acknowledgment may appear in the software
> *    itself, and wherever such third-party acknowledgments normally
> *    appear.
> *
> * 4) The name "Indiana University" or "Indiana University
> *    Extreme! Lab" shall not be used to endorse or promote
> *    products derived from this software without prior written
> *    permission from Indiana University.  For written permission,
> *    please contact http://www.extreme.indiana.edu/.
> *
> * 5) Products derived from this software may not use "Indiana
> *    University" name nor may "Indiana University" appear in their name,
> *    without prior written permission of the Indiana University.
> *
> * Indiana University provides no reassurances that the source code
> * provided does not infringe the patent or any other intellectual
> * property rights of any other entity.  Indiana University disclaims any
> * liability to any recipient for claims brought by any other entity
> * based on infringement of intellectual property rights or otherwise.
> *
> * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH
> * NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA
> * UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT
> * SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR
> * OTHER PROPRIETARY RIGHTS.  INDIANA UNIVERSITY MAKES NO WARRANTIES THAT
> * SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP
> * DOORS", "WORMS", OR OTHER HARMFUL CODE.  LICENSEE ASSUMES THE ENTIRE
> * RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS,
> * AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING
> * SOFTWARE.
> */
>
> java -Dlog xsul.dii.XsulDynamicInvoker "!MISC/andre/GetPrice.wsdl"
> getPrice keyboard
> MLogger $Revision: 1.8 $ $Date: 2005/02/16 05:52:51 $ (GMT) configured
> as ''  (XSUL version compile-time:2.7.9 runtime:2.7.9)
> Starting xsul.dii.XsulDynamicInvoker
> invoking operation 'getPrice' using WSDL from !MISC/andre/GetPrice.wsdl
> [ 18:52:58.769 main: xsul.wsif.impl.WSIFMessageElement.java:88
> addPlaceholderForParameters 5]
> elementPartQName=3D{http://tempuri.org/}getPrice
> [ 18:52:58.920 main: xsul.wsif.impl.WSIFMessageElement.java:184
> addPlaceholderForParameters 5] special messageIn=3D<n1:getPrice
> xmlns:n1=3D"http://tempuri.org/" />
> [ 18:52:58.920 main: xsul.wsif.impl.WSIFMessageElement.java:195
> addPlaceholderForParameters 5] messageIn=3D<n1:getPrice
> xmlns:n1=3D"http://tempuri.org/" />
> [ 18:52:58.940 main: xsul.wsif.impl.WSIFMessageElement.java:88
> addPlaceholderForParameters 5]
> elementPartQName=3D{http://tempuri.org/}getPriceResult
> [ 18:52:58.940 main: xsul.wsif.impl.WSIFMessageElement.java:245
> addListOfElementNames 3] adding sequence element type
> name=3DgetPriceResult typeQName=3D{http://www.w3.org/2001/XMLSchema}doubl=
e
> [ 18:52:58.940 main: xsul.wsif.impl.WSIFMessageElement.java:252
> addListOfElementNames 3] adding sequence element name=3DgetPriceResult
> [ 18:52:58.940 main: xsul.wsif.impl.WSIFMessageElement.java:177
> addPlaceholderForParameters 1] name=3DgetPriceResult
> [ 18:52:58.940 main: xsul.wsif.impl.WSIFMessageElement.java:184
> addPlaceholderForParameters 5] special messageIn=3D<n1:getPriceResult
> xmlns:n1=3D"http://tempuri.org/"><n1:getPriceResult /></n1:getPriceResult=
>
> [ 18:52:58.950 main: xsul.wsif.impl.WSIFMessageElement.java:195
> addPlaceholderForParameters 5] messageIn=3D<n1:getPriceResult
> xmlns:n1=3D"http://tempuri.org/"><n1:getPriceResult /></n1:getPriceResult=
>
> [ 18:52:58.960 main:
> xsul.invoker.http.HttpDynamicInfosetInvoker.java:248 invokeXml 1]
> host=3Dlocalhost port=3D80 secure=3Dfalse
> [ 18:52:58.960 main:
> xsul.http_client.plain_impl.PlainClientSocketFactory.java:45 connect 1]
> connect localhost:80 timeout:240000
> [ 18:52:59.250 main: trace.xsul.http.client.out
> xsul.http_client.HttpClientRequest.java:244 writeHeaders 1] TRACE:
> sending request headers:---
> POST /GetPrice/Service.asmx HTTP/1.0\r
> Host: localhost\r
> User-Agent: XSUL/2.7.9\r
> Content-Type: text/xml; charset=3Dutf-8\r
> Content-Length: 563\r
> Keep-Alive: 300\r
> SOAPAction: \"http://tempuri.org/getPrice\"\r
> Connection: keep-alive\r
> \r
> ---
>
> [ 18:52:59.280 main: trace.xsul.http.client.out
> xsul.http_client.HttpClientRequest.java:284 closeRequest 1] TRACE:
> sending request body:---
> <?xml version=3D'1.0' encoding=3D'utf-8'?><S:Envelope
> xmlns:xsd=3D'http://www.w3.org/2001/XMLSchema'
> xmlns:xsi=3D'http://www.w3.org/2001/XMLSchema-instance'
> xmlns:wsa=3D'http://www.w3.org/2005/08/addressing'
> xmlns:wsp=3D'http://schemas.xmlsoap.org/ws/2002/12/policy'
> xmlns:S=3D'http://schemas.xmlsoap.org/soap/envelope/'><S:Header><wsa:To>
> http://localhost/GetPrice/Service.asmx</wsa:To><wsa:Action>
> http://tempuri.org//ServiceSoap/getPrice
> </wsa:Action></S:Header><S:Body><n1:getPrice
> xmlns:n1=3D'http://tempuri.org/'
> ><n1:item>keyboard</n1:item></n1:getPrice></S:Body></S:Envelope>---
>
> >
> > Thanks in advance for any help!
> >
> > Best regards,
> >
> > Andre
> >
> >
> > ############### ENVELOPE ################
> > <?xml version=3D'1.0' encoding=3D'utf-8'?>
> > <S:Envelope xmlns:xsd=3D' http://www.w3.org/2001/XMLSchema' xmlns:xsi=
=3D'
> > http://www.w3.org/2001/XMLSchema-instance' xmlns:wsa=3D'
> > http://www.w3.org/2005/08/addressing'
> > xmlns:wsp=3D'http://schemas.xmlsoap.org/ws/2002/12/policy
> > <http://schemas.xmlsoap.org/ws/2002/12/policy>'
> > xmlns:S=3D'http://schemas.xmlsoap.org/soap/envelope/'
> > <http://schemas.xmlsoap.org/soap/envelope/%27>>
> >   <S:Header>
> >      <wsa:To>http://localhost/GetPrice/Service.asmx</wsa:To>
> >      <wsa:Action> http://tempuri.org//ServiceSoap/getPrice</wsa:Action>
> >   </S:Header>
> >   <S:Body>
> >      <n1:item xmlns:n1=3D' http://tempuri.org/' />
> >   </S:Body>
> > </S:Envelope>
> >
> >
> >
> > ############### WSDL ################
> >   <?xml version=3D"1.0" encoding=3D"utf-8" ?>
> > - <#> <wsdl:definitions xmlns:soap
> > =3D"*http://schemas.xmlsoap.org/wsdl/soap/*" xmlns:tm=3D"
> > *http://microsoft.com/wsdl/mime/textMatching/*" xmlns:soapenc=3D"
> > *http://schemas.xmlsoap.org/soap/encoding/*" xmlns:mime=3D"*
> > http://schemas.xmlsoap.org/wsdl/mime/*" xmlns:tns=3D"*
> > http://tempuri.org/*" xmlns:s=3D"*http://www.w3.org/2001/XMLSchema*"
> > xmlns:soap12 =3D"*http://schemas.xmlsoap.org/wsdl/soap12/*"
> > xmlns:http=3D"* http://schemas.xmlsoap.org/wsdl/http/*"
> > targetNamespace=3D"* http://tempuri.org/*"
> > xmlns:wsdl=3D"*http://schemas.xmlsoap.org/wsdl/*">
> > - <#> <wsdl:types>
> > - <#> <s:schema elementFormDefault =3D"*qualified*"
> > targetNamespace=3D"*http://tempuri.org/*">
> > - <#> <s:element name =3D"*item*">
> > - <#> <s:complexType>
> > - <#> <s:sequence>
> >   <s:element minOccurs=3D"*0* " maxOccurs=3D"*1*" name=3D"*item*"
> > type=3D"*s:string*" />
> >   </s:sequence>
> >   </s:complexType>
> >   </s:element>
> > - <#> <s:element name =3D"*getPriceResponse*">
> > - <#> <s:complexType>
> > - <#> <s:sequence>
> >   <s:element minOccurs=3D"*1* " maxOccurs=3D"*1*" name=3D"*getPriceResu=
lt*"
> > type=3D"*s:double*" />
> >   </s:sequence>
> >   </s:complexType>
> >   </s:element>
> >   </s:schema>
> >   </wsdl:types>
> > - <#> <wsdl:message name =3D"*getPriceSoapIn*">
> >   <wsdl:part name=3D"*parameters* " element=3D"*tns:item*" />
> >   </wsdl:message>
> > - <#> <wsdl:message name =3D"*getPriceSoapOut*">
> >   <wsdl:part name=3D"*parameters* " element=3D"*tns:getPriceResponse*" =
/>
> >   </wsdl:message>
> > - <#> <wsdl:portType name =3D"*ServiceSoap*">
> > + <#> <wsdl:operation name =3D"*getPrice*">
> >   <wsdl:input message=3D"*tns:getPriceSoapIn* " />
> >   <wsdl:output message=3D"*tns:getPriceSoapOut* " />
> >   </wsdl:operation>
> >   </wsdl:portType>
> > - <#> <wsdl:binding name =3D"*ServiceSoap*" type=3D"*tns:ServiceSoap*">
> >   <soap:binding transport=3D"* http://schemas.xmlsoap.org/soap/http*" /=
>
> > - <#> <wsdl:operation name =3D"*getPrice*">
> >   <soap:operation soapAction=3D"* http://tempuri.org/getPrice*"
> > style=3D"*document*" />
> > - <#> <wsdl:input>
> >   <soap:body use=3D"*literal* " />
> >   </wsdl:input>
> > - <#> <wsdl:output>
> >   <soap:body use=3D"*literal* " />
> >   </wsdl:output>
> >   </wsdl:operation>
> >   </wsdl:binding>
> > - <#> <wsdl:binding name =3D"*ServiceSoap12*" type=3D"*tns:ServiceSoap*=
">
> >   <soap12:binding transport=3D"* http://schemas.xmlsoap.org/soap/http*"=
 />
> > - <#> <wsdl:operation name =3D"*getPrice*">
> >   <soap12:operation soapAction=3D"* http://tempuri.org/getPrice*"
> > style=3D"*document*" />
> > - <#> <wsdl:input>
> >   <soap12:body use=3D"*literal* " />
> >   </wsdl:input>
> > - <#> <wsdl:output>
> >   <soap12:body use=3D"*literal* " />
> >   </wsdl:output>
> >   </wsdl:operation>
> >   </wsdl:binding>
> > - <#> <wsdl:service name =3D"*Service*">
> > - <#> <wsdl:port name =3D"*ServiceSoap*" binding=3D"*tns:ServiceSoap*">
> >   <soap:address location=3D"* http://localhost/GetPrice/Service.asmx*" =
/>
> >   </wsdl:port>
> > - <#> <wsdl:port name =3D"*ServiceSoap12*" binding=3D"*tns:ServiceSoap1=
2*">
> >   <soap12:address location=3D"* http://localhost/GetPrice/Service.asmx*=
"
> />
> >   </wsdl:port>
> >   </wsdl:service>
> >   </wsdl:definitions>
> >
> >
> >
> >
> >
> >
> > ######################## JAVA #########################
> >
> > import java.io.File ;
> > import java.net.URI;
> > import java.util.Iterator;
> > import java.util.List;
> > import javax.xml.namespace.QName;
> > import org.xmlpull.v1.builder.XmlElement;
> > import org.xmlpull.v1.builder.XmlInfosetBuilder;
> > import xsul.MLogger;
> > import xsul.XmlConstants;
> > import xsul.wsdl.WsdlBindingOperation;
> > import xsul.wsdl.WsdlDefinitions;
> > import xsul.wsdl.WsdlMessage;
> > import xsul.wsdl.WsdlPortTypeOperation;
> > import xsul.wsdl.WsdlResolver ;
> > import xsul.wsif.WSIFException;
> > import xsul.wsif.WSIFMessage;
> > import xsul.wsif.WSIFOperation;
> > import xsul.wsif.WSIFPort;
> > import xsul.wsif.WSIFService;
> > import xsul.wsif.WSIFServiceFactory;
> > import xsul.wsif.impl.WSIFMessageElement ;
> > import xsul.wsif.spi.WSIFProviderManager;
> >
> > public class XsulDynamicInvoker {
> >     private final static MLogger logger =3D MLogger.getLogger();
> >     private final static XmlInfosetBuilder builder =3D
> > XmlConstants.BUILDER ;
> >
> >     private static void usage(String errMsg) {
> >         System.err.println("Usage: {WSDL URL} {operation name}
> > [parameters ...]");
> >     }
> >
> >     public static void main(String[] args) throws Exception
> >     {
> >         System.err.println("Starting
> > "+XsulDynamicInvoker.class.getName());
> >         WSIFProviderManager.getInstance().addProvider( new
> > xsul.wsif_xsul_soap_http.Provider() );
> >         runClient(args);
> >     }
> >
> >     private static void runClient(String[] args) throws Exception {
> >         URI base =3D ((new File(".")).toURI());
> >
> >         if(args.length < 2) {
> >             usage("at least two argument required");
> >         }
> >
> >         String wsdlLoc =3D args[0];
> >
> >         String opName =3D args[1];
> >         String portName =3D null;
> >         if(opName.charAt(0) =3D=3D '{') {
> >             int pos =3D opName.indexOf('}');
> >             portName =3D opName.substring(1, pos);
> >             opName =3D opName.substring(pos+1);
> >         }
> >
> >         System.err.println("invoking operation '"+opName+"' using WSDL
> > from "+wsdlLoc);
> >         //log everything!
> >         MLogger.setCmdNames(":ALL");
> >         WsdlDefinitions def =3D
> > WsdlResolver.getInstance().loadWsdl(base, new URI(wsdlLoc));
> >
> >         WSIFServiceFactory wsf =3D WSIFServiceFactory.newInstance();
> >         WSIFService serv =3D wsf.getService(def);
> >
> >         WSIFPort port =3D serv.getPort(portName);
> >
> >         WSIFOperation op =3D port.createOperation(opName);
> >         WSIFMessage in =3D op.createInputMessage();
> >
> >         WsdlBindingOperation bindingOp =3D  op.getBindingOperation();
> >         WsdlPortTypeOperation portTypeOp =3D bindingOp.lookupOperation(=
);
> >         WsdlMessage inputMsg =3D portTypeOp.getInput().lookupMessage();
> >         Iterator partNames =3D in.partNames().iterator();
> >
> >         int count =3D 2;
> >         while(partNames.hasNext()) {
> >             //determine type of argument
> >             String partName =3D (String) partNames.next ();
> > //partNames.get(i-2);
> >             if(count < args.length) {
> >                 String partValue =3D args[count];
> >                 System.err.println(partName+"=3D"+partValue);
> >                 in.setObjectPart (partName, partValue);
> >             } else {
> >                 // will try to do some defaulting
> >                 QName type =3D
> > ((WSIFMessageElement)in).getPartType(partName);
> >
> >                 String localPart =3D type.getLocalPart();
> >                 if("string".equals(localPart)) {
> >                     in.setObjectPart(partName, "foo string");
> >                     System.err.println("defaulting
> > "+partName+"=3D"+in.getObjectPart(partName));
> >                 } else if("anyURI".equals(localPart)) {
> >                     in.setObjectPart(partName,
> > "gsiftp://rainier//tmp/foo.txt");
> >                     System.err.println("defaulting
> > "+partName+"=3D"+in.getObjectPart(partName));
> >                 } else if("URIArrayType".equals(localPart)) {
> >                     XmlElement arrayEl =3D builder.newFragment(partName=
);
> >
> > arrayEl.addElement("value").addChild("gsiftp://rainier//tmp/foo.txt");
> >                      in.setObjectPart(partName, arrayEl);
> >                     System.err.println("defaulting
> > "+partName+"=3D"+in.getObjectPart(partName));
> >                 }
> >             }
> >             ++count;
> >         }
> >
> >         if(op.isRequestResponseOperation()) {
> >             WSIFMessage out =3D op.createOutputMessage();
> >             WSIFMessage fault =3D op.createFaultMessage();
> >             boolean succes =3D op.executeRequestResponseOperation(in,
> > out, fault);
> >             if(succes) {
> >                 System.out.println("received response "+out);
> >             } else {
> >                 System.err.println("received fault "+fault);
> >             }
> >         } else {
> >             op.executeInputOnlyOperation(in);
> >             System.out.println("input only message was sent
> > successfully");
> >         }
> >     }
> > }
> >
>
>
> --
> The best way to predict the future is to invent it - Alan Kay
>
>
>
>

------=_Part_10664_32372029.1162924774231
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello Alek! Sorry for taking so long to reply you, I had some trouble with =
my computer!<br>Well, I inserted your code snippet... :<br>&nbsp;{<br> &nbs=
p; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WSIFMessageElement inputMessage =3D ((=
WSIFMessageElement)in);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;XmlNam=
espace ns =3D=20
inputMessage.getNamespace();<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i=
nputMessage.addElement(ns, &quot;item&quot;).addChild(&quot;keyboard&quot;)=
;<br>}<br><br>... and the things worked fine now with my service.<br>But it=
's not Dynamic (and WSD independent) anymore, isn't it? Because my code is =
now specific to my getPrice webservice, if I use another WSDL, it's not goi=
ng to work right? The &quot;keyboard&quot; part it's ok, I can substitute w=
ith args[2], but the &quot;item&quot; is a specific thing from my WSDL and =
cannot be used in another service (which will have another input message).
<br><br><br>Still on the WSDL, I totally agree with you about the optional =
input message (doesn't make any sense to me either!), but the strange thing=
 is that the WSDL was automatically generated by .NET framework when I atta=
ch a ?WSDL in the end of the endpoint:=20
<a href=3D"http://localhost/GetPrice/Service.asmx">http://localhost/GetPric=
e/Service.asmx</a>. I'm attaching (as a file now :) ) my .cs code for the .=
NET WService that generates that WSDL for you to take a look and see if som=
ething is wrong!
<br><br>Thanks again for your useful help!<br><br>Best regards,<br><br>Andr=
e<br><br><br><br><div><span class=3D"gmail_quote">On 10/31/06, <b class=3D"=
gmail_sendername">Aleksander Slominski</b> &lt;<a href=3D"mailto:aslom_at_cs.i=
ndiana.edu">
aslom_at_cs.indiana.edu</a>&gt; wrote:</span><blockquote class=3D"gmail_quote"=
 style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.=
8ex; padding-left: 1ex;">hi Andre,<br><br>please when you send WSDL to use =
for testing send it as attachment - i
<br>had to do plenty of editing to get working WSDL to reproduce the proble=
m.<br><br>more below.<br><br>Andr=E9 Piazza wrote:<br>&gt; Hello list!<br>&=
gt;<br>&gt; I got the latest xsul library(2.7.9), and everything is working=
 fine
<br>&gt; when dynamic invoking some web services (deployed in axis, phpnuso=
ap,<br>&gt; websphere), except for the document/literal wrapped .NET Web Se=
rvices.<br>&gt;<br>&gt; With the logging utility enabled, I can see that th=
e SOAP envelope is
<br>&gt; not sending the parameters correctly when the service is in .NET!<=
br>&gt;<br>&gt; My args are <a href=3D"http://localhost/GetPrice/Service.as=
mx?WSDL">http://localhost/GetPrice/Service.asmx?WSDL</a>&nbsp;&nbsp;getPric=
e<br>&gt; keyboard
<br>&gt;<br>&gt; The envelope is incorrect (in bold), the value of &quot;it=
em&quot; is not<br>&gt; included (should be &lt;item&gt;keyboard&lt;/item&g=
t; isn't it?).<br>your schema has elementFormDefault =3D&quot;*qualified*&q=
uot; so item has to be in
<br>schema namespace as it is<br>&gt; I'm also attaching the .wsdl of the .=
NET service, and the .java of<br>&gt; xsul dynamic invoker (without the sel=
ftest and stuff).<br>your input message (getPriceSoapIn) is &lt;item&gt; an=
d you have it optional
<br>(?!) - that is what is sent when getPrice operation is used - it does<b=
r>not really make sense to me .as it is generally required to have _some_<b=
r>input message - i have seen empty input and return message but still<br>
there was some message and never optional ...<br><br>instead i think you sh=
ould define getPrice&nbsp;&nbsp;element and have optional<br>item inside - =
see attached WSDL to see it.<br><br>the input parameter is optional so it c=
an not be set by
<br>XsulDynamicInvoker (DII is really simple command line tester to show AP=
I<br>but more sophisticated command line options would be required to suppo=
rt<br>XML as input, optional parameters etc) still you can force setting it=
 by
<br>adding right element to input message - for example (you could modify<b=
r>command line parsing logic to support name=3Dvalue to set it):<br><br>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WSIFMessageElement inputMess=
age =3D ((WSIFMessageElement)in);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;XmlNamespace ns =3D inputMessage.getNamespace(); // it is<br>qualified - c=
hildren element must have namespace<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inputMessage.addElement(ns, &quot;item&=
quot;).addChild(&quot;keyboard&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;}
<br><br>best,<br><br>alek<br><br>ps. here is modified DII i used and below =
is output<br><br>/* -*- mode: Java; c-basic-offset: 4; indent-tabs-mode: ni=
l; -*-<br>//------100-columns-wide------&gt;|*/<br>/*<br> * Copyright (c) 2=
005 Extreme! Lab, Indiana University. All rights reserved.
<br> *<br> * This software is open source. See the bottom of this file for =
the<br>licence.<br> *<br> * $Id: XsulDynamicInvoker.java,v 1.5 2006/05/24 0=
6:50:10 aslom Exp $<br> */<br><br>package xsul.dii;<br><br>import java.io.F=
ile
;<br>import java.net.URI;<br>import java.util.Iterator;<br>import java.util=
.List;<br>import javax.xml.namespace.QName;<br>import org.xmlpull.v1.builde=
r.XmlElement;<br>import org.xmlpull.v1.builder.XmlInfosetBuilder;<br>import=
=20
org.xmlpull.v1.builder.XmlNamespace;<br>import xsul.MLogger;<br>import xsul=
.XmlConstants;<br>import xsul.wsdl.WsdlBindingOperation;<br>import xsul.wsd=
l.WsdlDefinitions;<br>import xsul.wsdl.WsdlMessage;<br>import xsul.wsdl.Wsd=
lPortTypeOperation
;<br>import xsul.wsdl.WsdlResolver;<br>import xsul.wsif.WSIFException;<br>i=
mport xsul.wsif.WSIFMessage;<br>import xsul.wsif.WSIFOperation;<br>import x=
sul.wsif.WSIFPort;<br>import xsul.wsif.WSIFService;<br>import xsul.wsif.WSI=
FServiceFactory
;<br>import xsul.wsif.impl.WSIFMessageElement;<br>import xsul.wsif.spi.WSIF=
ProviderManager;<br><br>public class XsulDynamicInvoker {<br>&nbsp;&nbsp;&n=
bsp;&nbsp;private final static MLogger logger =3D MLogger.getLogger();<br>&=
nbsp;&nbsp;&nbsp;&nbsp;private final static XmlInfosetBuilder builder =3D=
=20
XmlConstants.BUILDER;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;private static void us=
age(String errMsg) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sys=
tem.err.println(&quot;Usage: {WSDL URL} {operation name}<br>[parameters ...=
]&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;publi=
c static void main(String[] args) throws Exception
<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;System.err.println(&quot;Starting &quot;+XsulDynamicInvoker.class.get=
Name());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WSIFProviderMan=
ager.getInstance().addProvider( new<br>xsul.wsif_xsul_soap_http.Provider() =
);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(
args.length &gt; 0 &amp;&amp; args[0].equals(&quot;selftest&quot;)) {<br>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Strin=
g GOOGLE_KEY =3D &quot;google.key&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String googleKey =3D System.getPro=
perty(GOOGLE_KEY);&nbsp;&nbsp;//<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(googleKey !=3D null) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;runClient(new String[]{<br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot=
;<a href=3D"http://api.google.com/GoogleSearch.wsdl">http://api.google.com/=
GoogleSearch.wsdl</a>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
quot;doGoogleSearch&quot;, googleKey, &quot;alek&quot;,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;0&quot;, &quot;10&quot;=
, &quot;false&quot;, &quot;&quot;, &quot;false&quot;, &quot;&quot;,<br>&quo=
t;latin1&quot;, &quot;latin1&quot;});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.err.println(&quot;Warning: pass your your google api<br>key as -D&qu=
ot;+GOOGLE_KEY+&quot;=3DXXXXXX&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//2005-01-17 error 200 OK body=
=3D&quot;&quot; Content-Type: text/html<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//runClient(new String[]{
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&quot;<a href=3D"http://www.ghettodriveby.com/soap/?wsdl">http://www.ghetto=
driveby.com/soap/?wsdl</a>&quot;,<br>&quot;getRandomGoogleSearch&quot;, &qu=
ot;aleksander slominksi&quot;});<br><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;run=
Client(new String[]{<br><br>&quot;<a href=3D"http://www.xmethods.net/sd/200=
1/BabelFishService.wsdl">http://www.xmethods.net/sd/2001/BabelFishService.w=
sdl</a>&quot;, &quot;BabelFish&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;en_fr&quot=
;, &quot;I'm going to the beach.&quot;});
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;runClient(new String[]{<br><br>&quot;<a href=3D"http://www.webservicex.net=
/ValidateEmail.asmx?wsdl">http://www.webservicex.net/ValidateEmail.asmx?wsd=
l</a>&quot;, &quot;IsValidEMail&quot;,<br>&quot;<a href=3D"mailto:aleksande=
r_at_example.com">
aleksander_at_example.com</a>&quot;});<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runClient(new String[]{<br><br>&quo=
t;<a href=3D"http://www.xmethods.net/sd/2001/TemperatureService.wsdl">http:=
//www.xmethods.net/sd/2001/TemperatureService.wsdl</a>&quot;, &quot;getTemp=
&quot;,
<br>&quot;02067&quot;});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;// java.io.IOException: Server returned HTTP respo=
nse code:<br>502 for URL:<br><a href=3D"http://services.xmethods.net/soap/u=
rn:xmethods-delayed-quotes.wsdl">http://services.xmethods.net/soap/urn:xmet=
hods-delayed-quotes.wsdl
</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runClien=
t(new String[]{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;//<br>&quot;<a href=3D"http://services.xmethods.net/soap/ur=
n:xmethods-delayed-quotes.wsdl">http://services.xmethods.net/soap/urn:xmeth=
ods-delayed-quotes.wsdl
</a>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;getQuote&quot;, &quot;IBM&quot;});<br=
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ru=
nClient(new String[]{<br><br>&quot;<a href=3D"http://mssoapinterop.org/asmx=
/xsd/round4XSD.wsdl">http://mssoapinterop.org/asmx/xsd/round4XSD.wsdl
</a>&quot;, &quot;echoString&quot;, &quot;Hello<br>World!!!&quot;});<br>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runCli=
ent(new String[]{<br><br>&quot;<a href=3D"http://samples.gotdotnet.com/quic=
kstart/aspplus/samples/services/MathService/VB/MathService.asmx?WSDL">
http://samples.gotdotnet.com/quickstart/aspplus/samples/services/MathServic=
e/VB/MathService.asmx?WSDL</a>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Add&quot;,=
 &quot;3&quot;, &quot;4&quot;});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runClient(new String[]{&nbsp;&nbsp;//somet=
imes timeout
<br><br>&quot;<a href=3D"http://www.webservicex.net/stockquote.asmx?WSDL">h=
ttp://www.webservicex.net/stockquote.asmx?WSDL</a>&quot;, &quot;GetQuote&qu=
ot;, &quot;IBM&quot;});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;runClient(new String[]{&nbsp;&nbsp;//FAILING - cant =
find
<br>WSDL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;//<br>&quot;<a href=3D"http://developerdays.com/cgi-bin/tempconver=
ter.exe/wsdl/ITempConverter">http://developerdays.com/cgi-bin/tempconverter=
.exe/wsdl/ITempConverter</a>&quot;,<br>&quot;CtoF&quot;, &quot;32&quot;});
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;runClient(new String[]{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&quot;<a href=3D"http://www.webservicex.net/icd10.asm=
x?WSDL">http://www.webservicex.net/icd10.asmx?WSDL</a>&quot;,<br>&quot;GetI=
CD10&quot;, &quot;foo&quot;});
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;//simple <a href=3D"http://www.ghettodriveby.com/soap/?wsdl">http://www.gh=
ettodriveby.com/soap/?wsdl</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//wsdl:import test<br><a href=3D"http://euti=
ls.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl">
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/soap/eutils.wsdl</a><br>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runClient=
(new String[]{<br><br>&quot;<a href=3D"http://ws.netviagens.com/webservices=
/AirFares.asmx?wsdl">http://ws.netviagens.com/webservices/AirFares.asmx?wsd=
l
</a>&quot;, &quot;GetFares&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;, &quot;=
JFK&quot;, &quot;WAW&quot;, &quot;2005-01-20&quot;, &quot;2005-02-02&quot; =
});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<br>&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runClient(a=
rgs);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;private static=
 void runClient(String[] args) throws Exception {<br>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;//args[0] =3D<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;URI base =3D ((new File(&quot;.&quot;)).toURI());<br><br>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(args.length &lt; 2) {<br>&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;usag=
e(&quot;at least two argument required&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String wsdlLoc =3D args[0];<br>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//System.out.println(&quot;loaded def=
=3D&quot;+def);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stri=
ng opName =3D args[1];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S=
tring portName =3D null;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;if(opName.charAt(0) =3D=3D '{') {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;int pos =3D opName.indexOf('}');<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;portName =3D opName.substring(1, pos);<br=
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;op=
Name =3D opName.substring(pos+1);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//System=
.out.println(&quot;invoking Google WS with query '&quot;+query+&quot;'
<br>using WSDL from &quot;+wsdlLoc);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;System.err.println(&quot;invoking operation '&quot;+opName+&qu=
ot;' using WSDL<br>from &quot;+wsdlLoc);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;//MLogger.setCmdNames(&quot;:ALL&quot;);<br>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WsdlDefinitions def =3D=20
WsdlResolver.getInstance().loadWsdl(base,<br>new URI(wsdlLoc));<br><br>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WSIFServiceFactory wsf =3D WSIF=
ServiceFactory.newInstance();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;WSIFService serv =3D wsf.getService(def);<br><br>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;WSIFPort port =3D serv.getPort
(portName);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WSIFOper=
ation op =3D port.createOperation(opName);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;WSIFMessage in =3D op.createInputMessage();<br><br><br>&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WsdlBindingOperation binding=
Op =3D&nbsp;&nbsp;op.getBindingOperation();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;WsdlPortTypeOperation portTypeOp =3D=20
bindingOp.lookupOperation();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;WsdlMessage inputMsg =3D portTypeOp.getInput().lookupMessage();<br>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Iterator partNames =3D in.part=
Names().iterator();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
//WSDL URL =3D - =3D=3D&gt; read from stdin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;//allow arguments:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//1. [position=3D]value=
 only allowed as first arguments if<br>position not specified (this is POSI=
TIONAL!)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&=
nbsp;&nbsp;position 1...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;//2. name=3Dvalue<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//4. =
[name]=3D&lt;xml&gt;value<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;//
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//-Depr=3D- =3D=3D&=
gt; read from stdin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//-D=
select=3D&quot;XPATH filter&quot;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;//process arguments<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;// deal with stupid element=3D wrapping and other stuff (special<=
br>case for one part hat is element) ...
<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int i =3D 2; i &lt; args.length; i+=
+) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//determine type of =
argument<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String partName =
=3D (String) partNames.next();<br>//partNames.get(i-2);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String partValue =3D arg=
s[i];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.err.println(=
partName+&quot;=3D&quot;+partValue);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;in.setObjectPart(partName, partValue);<br>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;}<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int count =3D 2;<br>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while(partNames.hasNext()) {<b=
r>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/=
/determine type of argument<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;String partName =3D (String) partNames.next();<=
br>//partNames.get(i-2);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;if(count &lt;=20
args.length) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String partValue =3D args[count];<br=
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;System.err.println(partName+&quot;=3D&quot;+partValue=
);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;in.setObjectPart(partName, partValue);<br>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {<=
br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;// will try to do some defaulting<br>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;QName type =3D ((WSIFMessageElement)in).getPartType(partName);<br><br>&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;String localPart =3D type.getLocalPart();<br>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;if(&quot;string&quot;.equals(localPart)) {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String DEFAULT_STRING =3D =
&quot;foo string&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in.=
setObjectPart(partName, DEFAULT_STRING);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;System.err.println(&quot;defaulting<br>&quot;+partName+&quot;=
=3D&quot;+in.getObjectPart(partName));
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;} else if(&quot;anyURI&quot;.equals(localPart)) {<=
br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String DEFAULT_URI =3D &quo=
t;gsiftp://rainier//tmp/foo.txt&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;in.setObjectPart(partName, DEFAULT_URI);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.err.println(&quot;defau=
lting<br>&quot;+partName+&quot;=3D&quot;+in.getObjectPart(partName));<br>&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;} else if(&quot;URIArrayType&quot;.equals(localPart)) {<=
br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XmlElement arrayEl =3D=20
builder.newFragment(partName);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;String DEFAULT_URI_ARRAY_ITEM =3D<br>&quot;gsiftp://rainier//tmp/foo.tx=
t&quot;;<br><br>arrayEl.addElement(&quot;value&quot;).addChild(DEFAULT_URI_=
ARRAY_ITEM);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
in.setObjectPart(partName, arrayEl);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;System.err.println(&quot;defaulting<br>&quot;+partName+&quot;=3D&=
quot;+in.getObjectPart(partName));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;++count;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WSIFMessageElement inputMessage =3D ((W=
SIFMessageElement)in);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;XmlNamespace ns =3D inputMessage.getNamespace(); // =
it is<br>qualified - children element must have namespace
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;inputMessage.addElement(ns, &quot;item&quot;).addChild(&quot;keyboard&quot=
;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;in.setObjectPart(&quot;key&quot;, key);<br>&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i=
n.setObjectPart(&quot;q&quot;, query);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;in.setObjectPart(&quot;start&quot;, &quot;0&quot=
;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in.setObjectPart(&quot;maxResults&quot;, &quo=
t;10&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in.setObjectPart(&quot;filter&quot;,=
 &quot;true&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;//restrict xsi:type=3D&quot;xsd:string&quot;<br>=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;in.setObjectPart(&quot;safeSearch&quot;, &quot;false=
&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//lr xsi:type=3D&quot;xsd:string&quot;<b=
r>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;
in.setObjectPart(&quot;ie&quot;, &quot;latin1&quot;);<br>&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;in.setObjectPart(&quot;oe&quot;,&quot;latin1&quot;);<br>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(op.isRequestResponseOperation()) {<br>=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WSI=
FMessage out =3D op.createOutputMessage
();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;WSIFMessage fault =3D op.createFaultMessage();<br>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boolean succes =3D op.ex=
ecuteRequestResponseOperation(in, out,<br>fault);<br>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(succes) {<br>&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;System.err.println(&quot;received response &quot;+out);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.err.println(&quot;received fault &=
quot;+fault);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else {=
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;op.executeInputOnlyOperation(in);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;input only mess=
age was sent successfully&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;=
&nbsp;}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;private static void addListOfElement=
Names(XmlElement sequenceEl,<br>List partNames) {<br>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;for(Iterator ei =3D<br>sequenceEl.requiredElement=
Content().iterator(); ei.hasNext(); ) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Xml=
Element xsdSomething =3D (XmlElement) ei.next();<br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(! xsdSomething.getName(=
).equals(&quot;element&quot;)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;throw new WSIFExce=
ption(&quot;only xsd:element is supported<br>in xsd:sequence&quot;);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;String name =3D xsdSomething.getAttributeValue(null, &quot;name&quot;);<=
br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
logger.fine(&quot;adding sequence element name=3D&quot;+name);<br>&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;partNames.ad=
d(name);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br><br>}<br><br>/*<br> * Indiana Univ=
ersity Extreme! Lab Software License, Version 1.2<br> *<br> * Copyright (c)=
 2002-2005 The Trustees of Indiana University.<br> * All rights reserved.<b=
r> *<br> * Redistribution and use in source and binary forms, with or witho=
ut
<br> * modification, are permitted provided that the following conditions a=
re<br> * met:<br> *<br> * 1) All redistributions of source code must retain=
 the above<br> *&nbsp;&nbsp;&nbsp;&nbsp;copyright notice, the list of autho=
rs in the original source
<br> *&nbsp;&nbsp;&nbsp;&nbsp;code, this list of conditions and the disclai=
mer listed in this<br> *&nbsp;&nbsp;&nbsp;&nbsp;license;<br> *<br> * 2) All=
 redistributions in binary form must reproduce the above<br> *&nbsp;&nbsp;&=
nbsp;&nbsp;copyright notice, this list of conditions and the disclaimer
<br> *&nbsp;&nbsp;&nbsp;&nbsp;listed in this license in the documentation a=
nd/or other<br> *&nbsp;&nbsp;&nbsp;&nbsp;materials provided with the distri=
bution;<br> *<br> * 3) Any documentation included with all redistributions =
must include<br> *&nbsp;&nbsp;&nbsp;&nbsp;the following acknowledgement:
<br> *<br> *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;This product includes=
 software developed by the Indiana<br> *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;University Extreme! Lab.&nbsp;&nbsp;For further information please visit<b=
r> *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=3D"http://www.extreme.india=
na.edu/">http://www.extreme.indiana.edu/
</a>&quot;<br> *<br> *&nbsp;&nbsp;&nbsp;&nbsp;Alternatively, this acknowled=
gment may appear in the software<br> *&nbsp;&nbsp;&nbsp;&nbsp;itself, and w=
herever such third-party acknowledgments normally<br> *&nbsp;&nbsp;&nbsp;&n=
bsp;appear.<br> *<br> * 4) The name &quot;Indiana University&quot; or &quot=
;Indiana University
<br> *&nbsp;&nbsp;&nbsp;&nbsp;Extreme! Lab&quot; shall not be used to endor=
se or promote<br> *&nbsp;&nbsp;&nbsp;&nbsp;products derived from this softw=
are without prior written<br> *&nbsp;&nbsp;&nbsp;&nbsp;permission from Indi=
ana University.&nbsp;&nbsp;For written permission,<br> *&nbsp;&nbsp;&nbsp;&=
nbsp;please contact=20
<a href=3D"http://www.extreme.indiana.edu/">http://www.extreme.indiana.edu/=
</a>.<br> *<br> * 5) Products derived from this software may not use &quot;=
Indiana<br> *&nbsp;&nbsp;&nbsp;&nbsp;University&quot; name nor may &quot;In=
diana University&quot; appear in their name,
<br> *&nbsp;&nbsp;&nbsp;&nbsp;without prior written permission of the India=
na University.<br> *<br> * Indiana University provides no reassurances that=
 the source code<br> * provided does not infringe the patent or any other i=
ntellectual<br> * property rights of any other entity.&nbsp;&nbsp;Indiana U=
niversity disclaims any
<br> * liability to any recipient for claims brought by any other entity<br=
> * based on infringement of intellectual property rights or otherwise.<br>=
 *<br> * LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED &quot;AS IS&quot; F=
OR WHICH
<br> * NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA<br> *=
 UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT<br> * SOFT=
WARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR<br> * OTH=
ER PROPRIETARY RIGHTS.&nbsp;&nbsp;INDIANA UNIVERSITY MAKES NO WARRANTIES TH=
AT
<br> * SOFTWARE IS FREE FROM &quot;BUGS&quot;, &quot;VIRUSES&quot;, &quot;T=
ROJAN HORSES&quot;, &quot;TRAP<br> * DOORS&quot;, &quot;WORMS&quot;, OR OTH=
ER HARMFUL CODE.&nbsp;&nbsp;LICENSEE ASSUMES THE ENTIRE<br> * RISK AS TO TH=
E PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS,
<br> * AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING<b=
r> * SOFTWARE.<br> */<br><br>java -Dlog xsul.dii.XsulDynamicInvoker &quot;!=
MISC/andre/GetPrice.wsdl&quot;<br>getPrice keyboard<br>MLogger $Revision:=
=20
1.8 $ $Date: 2005/02/16 05:52:51 $ (GMT) configured<br>as ''&nbsp;&nbsp;(XS=
UL version compile-time:2.7.9 runtime:2.7.9)<br>Starting xsul.dii.XsulDynam=
icInvoker<br>invoking operation 'getPrice' using WSDL from !MISC/andre/GetP=
rice.wsdl
<br>[ 18:52:58.769 main: xsul.wsif.impl.WSIFMessageElement.java:88<br>addPl=
aceholderForParameters 5]<br>elementPartQName=3D{<a href=3D"http://tempuri.=
org/}getPrice">http://tempuri.org/}getPrice</a><br>[ 18:52:58.920 main: xsu=
l.wsif.impl.WSIFMessageElement.java
:184<br>addPlaceholderForParameters 5] special messageIn=3D&lt;n1:getPrice<=
br>xmlns:n1=3D&quot;<a href=3D"http://tempuri.org/">http://tempuri.org/</a>=
&quot; /&gt;<br>[ 18:52:58.920 main: xsul.wsif.impl.WSIFMessageElement.java=
:195
<br>addPlaceholderForParameters 5] messageIn=3D&lt;n1:getPrice<br>xmlns:n1=
=3D&quot;<a href=3D"http://tempuri.org/">http://tempuri.org/</a>&quot; /&gt=
;<br>[ 18:52:58.940 main: xsul.wsif.impl.WSIFMessageElement.java:88<br>addP=
laceholderForParameters 5]
<br>elementPartQName=3D{<a href=3D"http://tempuri.org/}getPriceResult">http=
://tempuri.org/}getPriceResult</a><br>[ 18:52:58.940 main: xsul.wsif.impl.W=
SIFMessageElement.java:245<br>addListOfElementNames 3] adding sequence elem=
ent type
<br>name=3DgetPriceResult typeQName=3D{<a href=3D"http://www.w3.org/2001/XM=
LSchema}double">http://www.w3.org/2001/XMLSchema}double</a><br>[ 18:52:58.9=
40 main: xsul.wsif.impl.WSIFMessageElement.java:252<br>addListOfElementName=
s 3] adding sequence element name=3DgetPriceResult
<br>[ 18:52:58.940 main: xsul.wsif.impl.WSIFMessageElement.java:177<br>addP=
laceholderForParameters 1] name=3DgetPriceResult<br>[ 18:52:58.940 main: xs=
ul.wsif.impl.WSIFMessageElement.java:184<br>addPlaceholderForParameters 5] =
special messageIn=3D&lt;n1:getPriceResult
<br>xmlns:n1=3D&quot;<a href=3D"http://tempuri.org/">http://tempuri.org/</a=
>&quot;&gt;&lt;n1:getPriceResult /&gt;&lt;/n1:getPriceResult&gt;<br>[ 18:52=
:58.950 main: xsul.wsif.impl.WSIFMessageElement.java:195<br>addPlaceholderF=
orParameters 5] messageIn=3D&lt;n1:getPriceResult
<br>xmlns:n1=3D&quot;<a href=3D"http://tempuri.org/">http://tempuri.org/</a=
>&quot;&gt;&lt;n1:getPriceResult /&gt;&lt;/n1:getPriceResult&gt;<br>[ 18:52=
:58.960 main:<br>xsul.invoker.http.HttpDynamicInfosetInvoker.java:248 invok=
eXml 1]
<br>host=3Dlocalhost port=3D80 secure=3Dfalse<br>[ 18:52:58.960 main:<br>xs=
ul.http_client.plain_impl.PlainClientSocketFactory.java:45 connect 1]<br>co=
nnect localhost:80 timeout:240000<br>[ 18:52:59.250 main: trace.xsul.http.c=
lient.out
<br>xsul.http_client.HttpClientRequest.java:244 writeHeaders 1] TRACE:<br>s=
ending request headers:---<br>POST /GetPrice/Service.asmx HTTP/1.0\r<br>Hos=
t: localhost\r<br>User-Agent: XSUL/2.7.9\r<br>Content-Type: text/xml; chars=
et=3Dutf-8\r
<br>Content-Length: 563\r<br>Keep-Alive: 300\r<br>SOAPAction: \&quot;<a hre=
f=3D"http://tempuri.org/getPrice\">http://tempuri.org/getPrice\</a>&quot;\r=
<br>Connection: keep-alive\r<br>\r<br>---<br><br>[ 18:52:59.280 main: trace=
.xsul.http.client.out
<br>xsul.http_client.HttpClientRequest.java:284 closeRequest 1] TRACE:<br>s=
ending request body:---<br>&lt;?xml version=3D'1.0' encoding=3D'utf-8'?&gt;=
&lt;S:Envelope<br>xmlns:xsd=3D'<a href=3D"http://www.w3.org/2001/XMLSchema"=
>http://www.w3.org/2001/XMLSchema
</a>'<br>xmlns:xsi=3D'<a href=3D"http://www.w3.org/2001/XMLSchema-instance"=
>http://www.w3.org/2001/XMLSchema-instance</a>'<br>xmlns:wsa=3D'<a href=3D"=
http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing<=
/a>'
<br>xmlns:wsp=3D'<a href=3D"http://schemas.xmlsoap.org/ws/2002/12/policy">h=
ttp://schemas.xmlsoap.org/ws/2002/12/policy</a>'<br>xmlns:S=3D'<a href=3D"h=
ttp://schemas.xmlsoap.org/soap/envelope/'">http://schemas.xmlsoap.org/soap/=
envelope/'
</a>&gt;&lt;S:Header&gt;&lt;wsa:To&gt;<a href=3D"http://localhost/GetPrice/=
Service.asmx">http://localhost/GetPrice/Service.asmx</a>&lt;/wsa:To&gt;&lt;=
wsa:Action&gt;<a href=3D"http://tempuri.org//ServiceSoap/getPrice">http://t=
empuri.org//ServiceSoap/getPrice
</a>&lt;/wsa:Action&gt;&lt;/S:Header&gt;&lt;S:Body&gt;&lt;n1:getPrice<br>xm=
lns:n1=3D'<a href=3D"http://tempuri.org/'">http://tempuri.org/'</a>&gt;&lt;=
n1:item&gt;keyboard&lt;/n1:item&gt;&lt;/n1:getPrice&gt;&lt;/S:Body&gt;&lt;/=
S:Envelope&gt;---
<br><br>&gt;<br>&gt; Thanks in advance for any help!<br>&gt;<br>&gt; Best r=
egards,<br>&gt;<br>&gt; Andre<br>&gt;<br>&gt;<br>&gt; ############### ENVEL=
OPE ################<br>&gt; &lt;?xml version=3D'1.0' encoding=3D'utf-8'?&g=
t;
<br>&gt; &lt;S:Envelope xmlns:xsd=3D' <a href=3D"http://www.w3.org/2001/XML=
Schema">http://www.w3.org/2001/XMLSchema</a>' xmlns:xsi=3D'<br>&gt; <a href=
=3D"http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSc=
hema-instance
</a>' xmlns:wsa=3D'<br>&gt; <a href=3D"http://www.w3.org/2005/08/addressing=
">http://www.w3.org/2005/08/addressing</a>'<br>&gt; xmlns:wsp=3D'<a href=3D=
"http://schemas.xmlsoap.org/ws/2002/12/policy">http://schemas.xmlsoap.org/w=
s/2002/12/policy
</a><br>&gt; &lt;<a href=3D"http://schemas.xmlsoap.org/ws/2002/12/policy">h=
ttp://schemas.xmlsoap.org/ws/2002/12/policy</a>&gt;'<br>&gt; xmlns:S=3D'<a =
href=3D"http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.o=
rg/soap/envelope/
</a>'<br>&gt; &lt;<a href=3D"http://schemas.xmlsoap.org/soap/envelope/%27">=
http://schemas.xmlsoap.org/soap/envelope/%27</a>&gt;&gt;<br>&gt;&nbsp;&nbsp=
; &lt;S:Header&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;wsa:To&gt=
;<a href=3D"http://localhost/GetPrice/Service.asmx">
http://localhost/GetPrice/Service.asmx</a>&lt;/wsa:To&gt;<br>&gt;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&lt;wsa:Action&gt; <a href=3D"http://tempuri.org/=
/ServiceSoap/getPrice">http://tempuri.org//ServiceSoap/getPrice</a>&lt;/wsa=
:Action&gt;<br>&gt;&nbsp;&nbsp; &lt;/S:Header&gt;
<br>&gt;&nbsp;&nbsp; &lt;S:Body&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&lt;n1:item xmlns:n1=3D' <a href=3D"http://tempuri.org/">http://tempuri=
.org/</a>' /&gt;<br>&gt;&nbsp;&nbsp; &lt;/S:Body&gt;<br>&gt; &lt;/S:Envelop=
e&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; ############### WSDL ################
<br>&gt;&nbsp;&nbsp; &lt;?xml version=3D&quot;1.0&quot; encoding=3D&quot;ut=
f-8&quot; ?&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:definitions xmlns:soap<br>&gt;=
 =3D&quot;*<a href=3D"http://schemas.xmlsoap.org/wsdl/soap/*">http://schema=
s.xmlsoap.org/wsdl/soap/*
</a>&quot; xmlns:tm=3D&quot;<br>&gt; *<a href=3D"http://microsoft.com/wsdl/=
mime/textMatching/*">http://microsoft.com/wsdl/mime/textMatching/*</a>&quot=
; xmlns:soapenc=3D&quot;<br>&gt; *<a href=3D"http://schemas.xmlsoap.org/soa=
p/encoding/*">
http://schemas.xmlsoap.org/soap/encoding/*</a>&quot; xmlns:mime=3D&quot;*<b=
r>&gt; <a href=3D"http://schemas.xmlsoap.org/wsdl/mime/*">http://schemas.xm=
lsoap.org/wsdl/mime/*</a>&quot; xmlns:tns=3D&quot;*<br>&gt; <a href=3D"http=
://tempuri.org/*">
http://tempuri.org/*</a>&quot; xmlns:s=3D&quot;*<a href=3D"http://www.w3.or=
g/2001/XMLSchema*">http://www.w3.org/2001/XMLSchema*</a>&quot;<br>&gt; xmln=
s:soap12 =3D&quot;*<a href=3D"http://schemas.xmlsoap.org/wsdl/soap12/*">htt=
p://schemas.xmlsoap.org/wsdl/soap12/*
</a>&quot;<br>&gt; xmlns:http=3D&quot;* <a href=3D"http://schemas.xmlsoap.o=
rg/wsdl/http/*">http://schemas.xmlsoap.org/wsdl/http/*</a>&quot;<br>&gt; ta=
rgetNamespace=3D&quot;* <a href=3D"http://tempuri.org/*">http://tempuri.org=
/*</a>
&quot;<br>&gt; xmlns:wsdl=3D&quot;*<a href=3D"http://schemas.xmlsoap.org/ws=
dl/*">http://schemas.xmlsoap.org/wsdl/*</a>&quot;&gt;<br>&gt; - &lt;#&gt; &=
lt;wsdl:types&gt;<br>&gt; - &lt;#&gt; &lt;s:schema elementFormDefault =3D&q=
uot;*qualified*&quot;
<br>&gt; targetNamespace=3D&quot;*<a href=3D"http://tempuri.org/*">http://t=
empuri.org/*</a>&quot;&gt;<br>&gt; - &lt;#&gt; &lt;s:element name =3D&quot;=
*item*&quot;&gt;<br>&gt; - &lt;#&gt; &lt;s:complexType&gt;<br>&gt; - &lt;#&=
gt; &lt;s:sequence&gt;
<br>&gt;&nbsp;&nbsp; &lt;s:element minOccurs=3D&quot;*0* &quot; maxOccurs=
=3D&quot;*1*&quot; name=3D&quot;*item*&quot;<br>&gt; type=3D&quot;*s:string=
*&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;/s:sequence&gt;<br>&gt;&nbsp;&nbsp; &=
lt;/s:complexType&gt;<br>&gt;&nbsp;&nbsp; &lt;/s:element&gt;
<br>&gt; - &lt;#&gt; &lt;s:element name =3D&quot;*getPriceResponse*&quot;&g=
t;<br>&gt; - &lt;#&gt; &lt;s:complexType&gt;<br>&gt; - &lt;#&gt; &lt;s:sequ=
ence&gt;<br>&gt;&nbsp;&nbsp; &lt;s:element minOccurs=3D&quot;*1* &quot; max=
Occurs=3D&quot;*1*&quot; name=3D&quot;*getPriceResult*&quot;
<br>&gt; type=3D&quot;*s:double*&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;/s:seq=
uence&gt;<br>&gt;&nbsp;&nbsp; &lt;/s:complexType&gt;<br>&gt;&nbsp;&nbsp; &l=
t;/s:element&gt;<br>&gt;&nbsp;&nbsp; &lt;/s:schema&gt;<br>&gt;&nbsp;&nbsp; =
&lt;/wsdl:types&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:message name =3D&quot;*get=
PriceSoapIn*&quot;&gt;
<br>&gt;&nbsp;&nbsp; &lt;wsdl:part name=3D&quot;*parameters* &quot; element=
=3D&quot;*tns:item*&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:message&gt;<b=
r>&gt; - &lt;#&gt; &lt;wsdl:message name =3D&quot;*getPriceSoapOut*&quot;&g=
t;<br>&gt;&nbsp;&nbsp; &lt;wsdl:part name=3D&quot;*parameters* &quot; eleme=
nt=3D&quot;*tns:getPriceResponse*&quot; /&gt;
<br>&gt;&nbsp;&nbsp; &lt;/wsdl:message&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:por=
tType name =3D&quot;*ServiceSoap*&quot;&gt;<br>&gt; + &lt;#&gt; &lt;wsdl:op=
eration name =3D&quot;*getPrice*&quot;&gt;<br>&gt;&nbsp;&nbsp; &lt;wsdl:inp=
ut message=3D&quot;*tns:getPriceSoapIn* &quot; /&gt;
<br>&gt;&nbsp;&nbsp; &lt;wsdl:output message=3D&quot;*tns:getPriceSoapOut* =
&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:operation&gt;<br>&gt;&nbsp;&nbsp=
; &lt;/wsdl:portType&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:binding name =3D&quot=
;*ServiceSoap*&quot; type=3D&quot;*tns:ServiceSoap*&quot;&gt;
<br>&gt;&nbsp;&nbsp; &lt;soap:binding transport=3D&quot;* <a href=3D"http:/=
/schemas.xmlsoap.org/soap/http*">http://schemas.xmlsoap.org/soap/http*</a>&=
quot; /&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:operation name =3D&quot;*getPrice*=
&quot;&gt;<br>
&gt;&nbsp;&nbsp; &lt;soap:operation soapAction=3D&quot;* <a href=3D"http://=
tempuri.org/getPrice*">http://tempuri.org/getPrice*</a>&quot;<br>&gt; style=
=3D&quot;*document*&quot; /&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:input&gt;<br>&=
gt;&nbsp;&nbsp; &lt;soap:body use=3D&quot;*literal* &quot; /&gt;
<br>&gt;&nbsp;&nbsp; &lt;/wsdl:input&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:outpu=
t&gt;<br>&gt;&nbsp;&nbsp; &lt;soap:body use=3D&quot;*literal* &quot; /&gt;<=
br>&gt;&nbsp;&nbsp; &lt;/wsdl:output&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:oper=
ation&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:binding&gt;
<br>&gt; - &lt;#&gt; &lt;wsdl:binding name =3D&quot;*ServiceSoap12*&quot; t=
ype=3D&quot;*tns:ServiceSoap*&quot;&gt;<br>&gt;&nbsp;&nbsp; &lt;soap12:bind=
ing transport=3D&quot;* <a href=3D"http://schemas.xmlsoap.org/soap/http*">h=
ttp://schemas.xmlsoap.org/soap/http*
</a>&quot; /&gt;<br>&gt; - &lt;#&gt; &lt;wsdl:operation name =3D&quot;*getP=
rice*&quot;&gt;<br>&gt;&nbsp;&nbsp; &lt;soap12:operation soapAction=3D&quot=
;* <a href=3D"http://tempuri.org/getPrice*">http://tempuri.org/getPrice*</a=
>&quot;<br>&gt; style=3D&quot;*document*&quot; /&gt;
<br>&gt; - &lt;#&gt; &lt;wsdl:input&gt;<br>&gt;&nbsp;&nbsp; &lt;soap12:body=
 use=3D&quot;*literal* &quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:input&gt;=
<br>&gt; - &lt;#&gt; &lt;wsdl:output&gt;<br>&gt;&nbsp;&nbsp; &lt;soap12:bod=
y use=3D&quot;*literal* &quot; /&gt;
<br>&gt;&nbsp;&nbsp; &lt;/wsdl:output&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:ope=
ration&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:binding&gt;<br>&gt; - &lt;#&gt; &l=
t;wsdl:service name =3D&quot;*Service*&quot;&gt;<br>&gt; - &lt;#&gt; &lt;ws=
dl:port name =3D&quot;*ServiceSoap*&quot; binding=3D&quot;*tns:ServiceSoap*=
&quot;&gt;
<br>&gt;&nbsp;&nbsp; &lt;soap:address location=3D&quot;* <a href=3D"http://=
localhost/GetPrice/Service.asmx*">http://localhost/GetPrice/Service.asmx*</=
a>&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:port&gt;<br>&gt; - &lt;#&gt; &=
lt;wsdl:port name =3D&quot;*ServiceSoap12*&quot; binding=3D&quot;*tns:Servi=
ceSoap12*&quot;&gt;
<br>&gt;&nbsp;&nbsp; &lt;soap12:address location=3D&quot;* <a href=3D"http:=
//localhost/GetPrice/Service.asmx*">http://localhost/GetPrice/Service.asmx*=
</a>&quot; /&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:port&gt;<br>&gt;&nbsp;&nbsp;=
 &lt;/wsdl:service&gt;<br>&gt;&nbsp;&nbsp; &lt;/wsdl:definitions&gt;
<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; ##################=
###### JAVA #########################<br>&gt;<br>&gt; import java.io.File ;=
<br>&gt; import java.net.URI;<br>&gt; import java.util.Iterator;<br>&gt; im=
port=20
java.util.List;<br>&gt; import javax.xml.namespace.QName;<br>&gt; import or=
g.xmlpull.v1.builder.XmlElement;<br>&gt; import org.xmlpull.v1.builder.XmlI=
nfosetBuilder;<br>&gt; import xsul.MLogger;<br>&gt; import xsul.XmlConstant=
s
;<br>&gt; import xsul.wsdl.WsdlBindingOperation;<br>&gt; import xsul.wsdl.W=
sdlDefinitions;<br>&gt; import xsul.wsdl.WsdlMessage;<br>&gt; import xsul.w=
sdl.WsdlPortTypeOperation;<br>&gt; import xsul.wsdl.WsdlResolver ;<br>&gt; =
import=20
xsul.wsif.WSIFException;<br>&gt; import xsul.wsif.WSIFMessage;<br>&gt; impo=
rt xsul.wsif.WSIFOperation;<br>&gt; import xsul.wsif.WSIFPort;<br>&gt; impo=
rt xsul.wsif.WSIFService;<br>&gt; import xsul.wsif.WSIFServiceFactory;<br>
&gt; import xsul.wsif.impl.WSIFMessageElement ;<br>&gt; import xsul.wsif.sp=
i.WSIFProviderManager;<br>&gt;<br>&gt; public class XsulDynamicInvoker {<br=
>&gt;&nbsp;&nbsp;&nbsp;&nbsp; private final static MLogger logger =3D MLogg=
er.getLogger();<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; private final static XmlInfosetBuilder builder=
 =3D<br>&gt; XmlConstants.BUILDER ;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=
 private static void usage(String errMsg) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; System.err.println(&quot;Usage: {WSDL URL} {operat=
ion name}
<br>&gt; [parameters ...]&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;=
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; public static void main(String[] args) thr=
ows Exception<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp; System.err.println(&quot;Starting<br>&gt; &quo=
t;+XsulDynamicInvoker.class.getName());
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WSIFProviderManage=
r.getInstance().addProvider( new<br>&gt; xsul.wsif_xsul_soap_http.Provider(=
) );<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; runClient(args=
);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp=
; private static void runClient(String[] args) throws Exception {
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; URI base =3D ((new=
 File(&quot;.&quot;)).toURI());<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp; if(args.length &lt; 2) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usage(&quot;at least two=
 argument required&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; }<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S=
tring wsdlLoc =3D args[0];
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String opN=
ame =3D args[1];<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; St=
ring portName =3D null;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; if(opName.charAt(0) =3D=3D '{') {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int pos =3D opName.indexOf('}')=
;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; portName =3D opName.substring
(1, pos);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; opName =3D opName.substring(pos+1);<br>&gt;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; System.err.println(&quot;invoking operation '&quot;+=
opName+&quot;' using WSDL<br>&gt; from &quot;+wsdlLoc);<br>&gt;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //log everything!
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MLogger.setCmdName=
s(&quot;:ALL&quot;);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; WsdlDefinitions def =3D<br>&gt; WsdlResolver.getInstance().loadWsdl(base,=
 new URI(wsdlLoc));<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; WSIFServiceFactory wsf =3D WSIFServiceFactory.newInstance
();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WSIFService ser=
v =3D wsf.getService(def);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; WSIFPort port =3D serv.getPort(portName);<br>&gt;<br>&gt;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WSIFOperation op =3D port.cr=
eateOperation(opName);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; WSIFMessage in =3D=20
op.createInputMessage();<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; WsdlBindingOperation bindingOp =3D&nbsp;&nbsp;op.getBindingOp=
eration();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WsdlPort=
TypeOperation portTypeOp =3D bindingOp.lookupOperation();<br>&gt;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WsdlMessage inputMsg =3D=20
portTypeOp.getInput().lookupMessage();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; Iterator partNames =3D in.partNames().iterator();<br>&g=
t;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int count =3D 2;=
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while(partNames.ha=
sNext()) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; //determine type of argument
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; String partName =3D (String) partNames.next ();<br>&gt; //partNames.g=
et(i-2);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; if(count &lt; args.length) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Str=
ing partValue =3D args[count];<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
System.err.println(partName+&quot;=3D&quot;+partValue);<br>&gt;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; in.setObjectPart (partName, partValue);<br>&gt;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&gt;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; // will try to do some defaulting<br>&gt;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; QName type =3D
<br>&gt; ((WSIFMessageElement)in).getPartType(partName);<br>&gt;<br>&gt;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp; String localPart =3D type.getLocalPart();<br>&gt;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; if(&quot;string&quot;.equals(localPart)) {<br>&gt;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
in.setObjectPart(partName, &quot;foo string&quot;);<br>&gt;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.err.println(&quot;defaulting<br>&gt; &=
quot;+partName+&quot;=3D&quot;+in.getObjectPart(partName));<br>&gt;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; } else if(&quot;anyURI&quot;.equals(localPart)) {
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in.setObjectPart(part=
Name,<br>&gt; &quot;gsiftp://rainier//tmp/foo.txt&quot;);<br>&gt;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.err.println(&quot;defaulting<br>=
&gt; &quot;+partName+&quot;=3D&quot;+in.getObjectPart(partName));
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else if(&quot;URIArrayType&quot;.equals(loc=
alPart)) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XmlElement =
arrayEl =3D builder.newFragment(partName);<br>&gt;<br>&gt; arrayEl.addEleme=
nt(&quot;value&quot;).addChild(&quot;gsiftp://rainier//tmp/foo.txt&quot;);
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in.setObje=
ctPart(partName, arrayEl);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; System.err.println(&quot;defaulting<br>&gt; &quot;+partName+&quot;=3D&=
quot;+in.getObjectPart(partName));<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; }<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; ++count;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; }<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(op.=
isRequestResponseOperation()) {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WSIFMessage out =3D op.createOutputMes=
sage();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; WSIFMessage fault =3D=20
op.createFaultMessage();<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boolean succes =3D op.executeRequestResponseO=
peration(in,<br>&gt; out, fault);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(succes) {<br>&gt;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; System.out.println(&quot;received response &quot;+out);
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; } else {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.err.println(&quot;receiv=
ed fault &quot;+fault);<