cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice with attachemnts

Former Member
0 Kudos

Hi,

I want to develop a scenario like below

1. When IDOC is triggered from R/3 then XI should get the IDOC data and pass the data as an attachment to the webservice

2. Get the response from the webservice and if there is any failure send the error details as mail.

Is this scenario can be acheived with out BPM since its an synchronous one and we have to actually trigger mail based on the response returned from Webservice.

In the WSDL file which we have received, is having the below structure

<soapenv:Envelope

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:ueb="Interface1">

<soapenv:Header/>

<soapenv:Body>

<ueb:Publish>

<aClientId>TEST</aClientId>

<aUser>test</aUser>

<aPassword>****</aPassword>

<aDomain>test</aDomain>

<aApplication>AP</aApplication>

<aSchema>ORDERS</aSchema>

<aDestination>Target</aDestination>

<aReference>1111</aReference>

<aMessage>cid:testfile.txt</aMessage>

<aMessageFormat>10</aMessageFormat>

<aDuplicates>0</aDuplicates>

</ueb:Publish>

</soapenv:Body>

</soapenv:Envelope>

Please suggest how can i send with attachments to Webservice.

Thanks..

Dinesh

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

> Is this scenario can be acheived with out BPM since its an synchronous one and we have to actually trigger mail based on the response returned from Webservice.

This scenario cannot be achieved in PI standard, no matter if you use BPM or not.

You need additional Java implementation.

Former Member
0 Kudos

Hi Stefan,

Thanx for your response...Is that customer module we have to build or can you please suggest on Java implementation...

Thank & Regards,

Dinesh

stefan_grube
Active Contributor
0 Kudos

For creating an attachment you can either use an adapter module or a Java proxy, in PI 7.1 you can use also a Java mapping.

For sending the email you can use the java mail api which send the email without using the mail adapter.

Former Member
0 Kudos

can you help me...for sending attachment plz note my receiver is SOAP adapter..

Thanks

former_member200962
Active Contributor
0 Kudos

You have to make use of a BPM.

For attachment you can check the features provided by the Receiver SOAP adapter...or can even search SDN.

In the WSDL file which we have received, is having the below structure

If I am not wrong the structure you provided does not look like a WSDL file.

Regards,

Abhishek.

Edited by: abhishek salvi on Dec 7, 2010 4:39 PM

Former Member
0 Kudos

Hi Abshikek,

Thanx for your quick response...This is WSDL file we have got from user

By assigning IDOC data to "aMessage" field and checking the "Keep Attachments" option in SOAP receiver adapter, XI will be able to send as attachments?

Actually 3rd party have given a sample soap query where they are assigning value as given below

<aMessage>cid:file.txt</aMessage>

Please suggest us?

<definitions

name="UPSRInterfaceServiceName"

targetNamespace="UPSRInterface"

xmlns:tns="UPSRInterface"

xmlns="http://schemas.xmlsoap.org/wsdl/"

xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">

<message name="TPSRInterface_CalcWS">

<part name="aClientId" type="xsd:string"/>

<part name="aUser" type="xsd:string"/>

<part name="aPassword" type="xsd:string"/>

<part name="aDomain" type="xsd:string"/>

<part name="aApplication" type="xsd:string"/>

<part name="aSchema" type="xsd:string"/>

<part name="aDestination" type="xsd:string"/>

<part name="aReference" type="xsd:string"/>

<part name="aMessage" type="xsd:string"/>

<part name="aMessageFormat" type="xsd:int"/>

<part name="aDuplicates" type="xsd:int"/>

</message>

<message name="TPSRInterface_CalcWSResponse">

<part name="return" type="xsd:string"/>

</message>

<portType name="UPSRInterfacePortType">

<operation name="TPSRInterface_CalcWS">

<input message="tns:TPSRInterface_CalcWS"/>

<output message="tns:TPSRInterface_CalcWSResponse"/>

</operation>

</portType>

<binding name="UPSRInterfacPSRnding" type="tns:UPSRInterfacePortType">

<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>

<operation name="TPSRInterface_CalcWS">

<soap:operation soapAction="urn:UPSRInterface#TPSRInterface_CalcWS" style="rpc"/>

<input>

<soap:body use="literal" namespace="UPSRInterface" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

</input>

<output>

<soap:body use="literal" namespace="UPSRInterface" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

</output>

</operation>

</binding>

<service name="UPSRInterfaceService">

<port name="UPSRInterfacePort" binding="tns:UPSRInterfacPSRnding">

<soap:address location="https://testserver.com:9000"/>

</port>

</service>

</definitions>

Thanks & Regards,

Dinesh