WebService document-style

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

WebService document-style

Marc.Benimeli
Hi,

I try to call a MS WebService.
The WebMethod have a string input parameter.

IE:
[WebMethod]
public XmlDocument Search(string cSearch)
....

How can I declare a parameter in the <delegation:execute> section of my
WebService call ?

Note that the call of this WebService work without parameter :

            <p:processor name="oxf:delegation"
xmlns:p="http://www.orbeon.com/oxf/pipeline">
                <p:input name="interface">
                    <config>  
                        <service id="Test" type="webservice"
style="document" endpoint="http://MyServer/Service.asmx">
                            <operation name="Search"
soap-action="http://MyUrl/Search" />
                        </service>
                    </config>
                </p:input>
                <p:input name="call">
                    <delegation:execute service="Search"
operation="Search" xsl:version="2.0"
xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
                    </delegation:execute>
                </p:input>  
                <p:output name="data" ref="data"/>
            </p:processor>

TIA,

Marc



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: WebService document-style

Alessandro  Vernet
Administrator
Hi Marc,

It depends how the web service is setup. Do you have a WSDL for that
service? Or simpler, can you call the service with some test UI and
see what the document sent to the service looks like?

Alex

On 2/20/06, [hidden email] <[hidden email]> wrote:

> Hi,
>
> I try to call a MS WebService.
> The WebMethod have a string input parameter.
>
> IE:
> [WebMethod]
> public XmlDocument Search(string cSearch)
> ....
>
> How can I declare a parameter in the <delegation:execute> section of my
> WebService call ?
>
> Note that the call of this WebService work without parameter :
>
>             <p:processor name="oxf:delegation"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>                 <p:input name="interface">
>                     <config>
>                         <service id="Test" type="webservice"
> style="document" endpoint="http://MyServer/Service.asmx">
>                             <operation name="Search"
> soap-action="http://MyUrl/Search" />
>                         </service>
>                     </config>
>                 </p:input>
>                 <p:input name="call">
>                     <delegation:execute service="Search"
> operation="Search" xsl:version="2.0"
> xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
>                     </delegation:execute>
>                 </p:input>
>                 <p:output name="data" ref="data"/>
>             </p:processor>
>
> TIA,
>
> Marc
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: WebService document-style

Marc.Benimeli
In reply to this post by Marc.Benimeli
Hi Alex,

Here is the WSDL of the Web Sercice I want to use :

  <?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://service/mobydoc.fr/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://service/mobydoc.fr/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://service/mobydoc.fr/">
- <s:element name="ListeInv">
- <s:complexType>
- <s:sequence>
  <s:element minOccurs="0" maxOccurs="1" name="cSearch" type="s:string" />
  </s:sequence>
  </s:complexType>
  </s:element>
- <s:element name="ListeInvResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="ListeInvResult">
- <s:complexType mixed="true">
- <s:sequence>
  <s:any />
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:sequence>
  </s:complexType>
  </s:element>
  </s:schema>
  </wsdl:types>
- <wsdl:message name="ListeInvSoapIn">
  <wsdl:part name="parameters" element="tns:ListeInv" />
  </wsdl:message>
- <wsdl:message name="ListeInvSoapOut">
  <wsdl:part name="parameters" element="tns:ListeInvResponse" />
  </wsdl:message>
- <wsdl:portType name="MobyServiceSoap">
- <wsdl:operation name="ListeInv">
  <wsdl:input message="tns:ListeInvSoapIn" />
  <wsdl:output message="tns:ListeInvSoapOut" />
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="MobyServiceSoap" type="tns:MobyServiceSoap">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ListeInv">
  <soap:operation soapAction="http://service/mobydoc.fr/ListeInv" style="document" />
- <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:binding name="MobyServiceSoap12" type="tns:MobyServiceSoap">
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ListeInv">
  <soap12:operation soapAction="http://service/mobydoc.fr/ListeInv" style="document" />
- <wsdl:input>
  <soap12:body use="literal" />
  </wsdl:input>
- <wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="MobyService">
- <wsdl:port name="MobyServiceSoap" binding="tns:MobyServiceSoap">
  <soap:address location="http://localhost/mobyweb1/Service.asmx" />
  </wsdl:port>
- <wsdl:port name="MobyServiceSoap12" binding="tns:MobyServiceSoap12">
  <soap12:address location="http://localhost/mobyweb1/Service.asmx" />
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Alessandro Vernet
Envoyé : mercredi 22 février 2006 23:25
À : [hidden email]
Objet : Re: [ops-users] WebService document-style

Hi Marc,

It depends how the web service is setup. Do you have a WSDL for that service? Or simpler, can you call the service with some test UI and see what the document sent to the service looks like?

Alex

On 2/20/06, [hidden email] <[hidden email]> wrote:

> Hi,
>
> I try to call a MS WebService.
> The WebMethod have a string input parameter.
>
> IE:
> [WebMethod]
> public XmlDocument Search(string cSearch) ....
>
> How can I declare a parameter in the <delegation:execute> section of
> my WebService call ?
>
> Note that the call of this WebService work without parameter :
>
>             <p:processor name="oxf:delegation"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>                 <p:input name="interface">
>                     <config>
>                         <service id="Test" type="webservice"
> style="document" endpoint="http://MyServer/Service.asmx">
>                             <operation name="Search"
> soap-action="http://MyUrl/Search" />
>                         </service>
>                     </config>
>                 </p:input>
>                 <p:input name="call">
>                     <delegation:execute service="Search"
> operation="Search" xsl:version="2.0"
> xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
>                     </delegation:execute>
>                 </p:input>
>                 <p:output name="data" ref="data"/>
>             </p:processor>
>
> TIA,
>
> Marc
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: WebService document-style

Alessandro  Vernet
Administrator
In reply to this post by Marc.Benimeli
Hi Marc,

Try something along the lines of the code attached. If that does not
work as-is, I recommend you try to call the service with a tool that
builds the envelope for you based on your WSDL (like XML Spy, or
Mindreef SOAPscope) and compare that envelope to the one sent by the
Delegation processor.

Alex

On 2/20/06, [hidden email] <[hidden email]> wrote:

> Hi,
>
> I try to call a MS WebService.
> The WebMethod have a string input parameter.
>
> IE:
> [WebMethod]
> public XmlDocument Search(string cSearch)
> ....
>
> How can I declare a parameter in the <delegation:execute> section of my
> WebService call ?
>
> Note that the call of this WebService work without parameter :
>
>             <p:processor name="oxf:delegation"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>                 <p:input name="interface">
>                     <config>
>                         <service id="Test" type="webservice"
> style="document" endpoint="http://MyServer/Service.asmx">
>                             <operation name="Search"
> soap-action="http://MyUrl/Search" />
>                         </service>
>                     </config>
>                 </p:input>
>                 <p:input name="call">
>                     <delegation:execute service="Search"
> operation="Search" xsl:version="2.0"
> xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
>                     </delegation:execute>
>                 </p:input>
>                 <p:output name="data" ref="data"/>
>             </p:processor>
>
> TIA,
>
> Marc
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

ws-call.xpl (824 bytes) Download Attachment
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: WebService document-style

Marc.Benimeli
In reply to this post by Marc.Benimeli
Hi Alex,

Thank you. It works.
Namespaces, namespaces...
The tools give me a good way to debug my code.

Regards,

Marc

-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Alessandro Vernet
Envoyé : mardi 28 février 2006 02:08
À : [hidden email]
Objet : Re: [ops-users] WebService document-style

Hi Marc,

Try something along the lines of the code attached. If that does not work as-is, I recommend you try to call the service with a tool that builds the envelope for you based on your WSDL (like XML Spy, or Mindreef SOAPscope) and compare that envelope to the one sent by the Delegation processor.

Alex

On 2/20/06, [hidden email] <[hidden email]> wrote:

> Hi,
>
> I try to call a MS WebService.
> The WebMethod have a string input parameter.
>
> IE:
> [WebMethod]
> public XmlDocument Search(string cSearch) ....
>
> How can I declare a parameter in the <delegation:execute> section of
> my WebService call ?
>
> Note that the call of this WebService work without parameter :
>
>             <p:processor name="oxf:delegation"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
>                 <p:input name="interface">
>                     <config>
>                         <service id="Test" type="webservice"
> style="document" endpoint="http://MyServer/Service.asmx">
>                             <operation name="Search"
> soap-action="http://MyUrl/Search" />
>                         </service>
>                     </config>
>                 </p:input>
>                 <p:input name="call">
>                     <delegation:execute service="Search"
> operation="Search" xsl:version="2.0"
> xmlns:delegation="http://orbeon.org/oxf/xml/delegation">
>                     </delegation:execute>
>                 </p:input>
>                 <p:output name="data" ref="data"/>
>             </p:processor>
>
> TIA,
>
> Marc
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws