HTTP Post MIME

Hello,
I have requirement to post and XML document to an URL , I have been doing that using HTTP POST method ,
But now, I have to send and attachment along with the message, ( how can I implement MIME Message using HTTP Post methodology)
currently I am using
URLConnection conn = url.openConnection();     
            conn.setDoOutput(true);     
            OutputStreamWriter wr =     
                new OutputStreamWriter(conn.getOutputStream());     
            wr.write(data);     
            wr.flush();     
   I need to use MIME now.
Please let me know
Thanks
sur

863709 wrote:
Basically , we have to upload a Excel document to an External Client , we used to do that using Excel directly by logging into their website and uploading the excel file,
Now we want to automate this, by using XML . but still have the Excel attachment
The guide says, I can post the following documents to an URL using MIME, I am not sure what they mean by that.
"The following example shows a Catalog Upload document. It contains two documents enclosed in a MIME
envelope: a CatalogUploadRequest document and a CIF 3.0 catalog."
--kdflkajfdksadjfklasdjfkljdfdsfdkf
Content-type: text/xml; charset=UTF-8
Content-ID: <[email protected]>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
<cXML timestamp="2006-12-28T16:56:03-08:00"
payloadID="[email protected]">
<Header>
<From>
<Credential domain="DUNS">
<Identity>123456789</Identity>
</Credential>
</From>
<To>
<Credential domain="NetworkID">
<Identity>AN01000000001</Identity>
</Credential>
</To>
<Sender>
<Credential domain="DUNS">
<Identity>123456789</Identity>
<SharedSecret>abracadabra</SharedSecret>
</Credential>
<UserAgent>MyHomemadeCatalogManager</UserAgent>
</Sender>
</Header>
<Request>
<CatalogUploadRequest operation="update">
<CatalogName xml:lang="en">Winter Prices</CatalogName>
<Description xml:lang="en">This catalog contains our premiere-level prices for office
chairs and other durable furniture.</Description>
<Attachment>
<URL>cid: [email protected]</URL>
</Attachment>
<Commodities>
<CommodityCode>52</CommodityCode>
</Commodities>
<AutoPublish enabled="true"/>
<Notification>
<Email>[email protected]</Email>
<URLPost enabled="true"/>
</Notification>
</CatalogUploadRequest>
</Request>
</cXML>
--kdflkajfdksadjfklasdjfkljdfdsfdkf
Content-type: text/plain; charset=US-ASCII
Content-Disposition: attachment; filename=PremiereCatalog.cif
Content-ID: <[email protected]>
Content-length: 364
CIF_I_V3.0
LOADMODE: F
CODEFORMAT: UNSPSC
CURRENCY: USD
SUPPLIERID_DOMAIN: DUNS
ITEMCOUNT: 3
TIMESTAMP: 2006-01-15 15:25:04
DATA
942888710,34A11,C11,"Eames Chair",11116767,400.00,EA,3,"Fast MFG",,,400.00
942888710,56A12,C12,"Eames Ottoman",11116767,100.00,EA,3,"Fast MFG",,,100.00
942888710,78A13,C13,"Folding Chair",11116767,25.95,EA,3,"Fast MFG",,,25.95
ENDOFDATA
--kdflkajfdksadjfklasdjfkljdfdsfdkf--Now my question is , even if I use Apache or any other thing, how can I actually send 2 files, ( one which is header and one Excel file or cif file what ever it is)I suggest you look at the HTTP MIME sectiona t http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 and after that look at http://hc.apache.org/httpcomponents-client-ga/httpmime/examples/org/apache/http/examples/entity/mime/ClientMultipartFormPost.java for an e.g. You can also add multiple attachments, just google for it. Now that i think about it, it probably might be possible to do it with native JDK components, but not 100% sure of it.
Edited by: maheshguruswamy on Aug 26, 2011 8:50 AM

Similar Messages

  • Http post issue in soa suite 11g  with 10g wsdl

    I have 10g process that has http post wsdl as below. When I'm trying to create a project in 11g 11.1.1.4 with same wsdl, getting the following error at building the project. "Error(12,61): Parse of component type files failed, check the adf-config.xml file : "Error at line 34 char 64: Malformed WS Binding port. Missing # between namespace URI and service/port names."
    I'm sure that http post mechanism is changed in 11g, but can you please help what exactly is wrong ?
    <?xml version="1.0"?>
    <definitions name="HTTPPostService"
    targetNamespace="http://services.otn.com"
    xmlns:tns="http://services.otn.com"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
              xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
              xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    >
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    TYPE DEFINITION - List of types participating in this BPEL process
    The BPEL Designer will generate default request and response types
    but you can define or import any XML Schema type and use them as part
    of the message types.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <types>
    <schema attributeFormDefault="qualified" elementFormDefault="qualified"
    targetNamespace="http://services.otn.com"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="Postreq">
    <complexType>
    <sequence>
    <element name="Order_Update_Request">
    <complexType>
    <sequence>
    <element name="ORD_ID" type="string"/>
    <element name="E_MAIL" type="string"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    <element name="Postresp">
    <complexType>
    <sequence>
    <element name="Order_Update_Response">
    <complexType>
    <sequence>
    <element name="RETURN_STATUS" type="string"/>
    <element name="MESSAGE_TEXT" type="string"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </schema>
    </types>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    MESSAGE TYPE DEFINITION - Definition of the message types used as
    part of the port type defintions
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <message name="HTTPPostServiceRequestMessage">
    <part name="payload" element="tns:Postreq"/>
    </message>
    <message name="HTTPPostServiceResponseMessage">
    <part name="payload" element="tns:Postresp"/>
    </message>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PORT TYPE DEFINITION - A port type groups a set of operations into
    a logical service unit.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <!-- portType implemented by the HTTPPostService BPEL process -->
    <portType name="HTTPPostService">
    <operation name="IScript_Update_Order">
    <input message="tns:HTTPPostServiceRequestMessage" />
    <output message="tns:HTTPPostServiceResponseMessage"/>
    </operation>
    </portType>
    <binding name="HTTPPost" type="tns:HTTPPostService">
    <http:binding verb="POST"/>
    <operation name="IScript_Update_Order">
    <http:operation location="/PSIG/HttpConnector?From=PSFT_XINBOUND&amp;MessageName=ABC_ORD_UPDORDER&amp;MessageType=sync&amp;MessageVersion=v1"/>
    <input>
    <mime:mimeXml part="payload"/>
    <mime:content type="text/xml"/>
    </input>
    <output>
    <mime:mimeXml part="payload"/>
              <mime:content type="text/xml"/>
    </output>
    </operation>
    </binding>
    <service name="HTTPPostService">
    <port name="HTTPPost" binding="tns:HTTPPost">
    <http:address location="http://myserver.mycompany.com"/>
    </port>
    </service>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PARTNER LINK TYPE DEFINITION
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="HTTPPostService">
    <plnk:role name="HTTPPostServiceProvider">
    <plnk:portType name="tns:HTTPPostService"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

    Can you make sure your helloworld is using adf bindings as mentioned in thread Re: Urgent :: 11g Invoking Composite from Java/From Webservice Proxy

  • Invoking http post from BPEL is not passing parameters

    Hi,
    I have a simple BPEL process where I am trying to send an xml string in a request
    parameter to a servlet. Servlet is pretty simple. It just prints the request parameters and returns. But problem is that I am not getting any request
    parameters when I am using http post but everything works fine when using
    http get.
    Enclosed is the wsdl that I am using.
    Any information will be of great help
    Thanks
    Rajesh
    <?xml version="1.0" encoding="utf-8"?>
    <definitions
    targetNamespace="http://xmlns.oracle.com/OISService"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:client="http://xmlns.oracle.com/OISService"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >
    <types>
    <xsd:schema elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/OISService"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="header">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="status" type="xsd:string"/>
    <xsd:element name="description" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="responsedata" type="xsd:string"/>
    </xsd:schema>
    </types>
    <message name="SendDataToOISRequestMessage">
    <part name="xmldata" element="client:responsedata"/>
    </message>
    <message name="SendDataToOISResponseMessage">
    <part name="payload" element="client:header"/>
    </message>
    <portType name="SendDataToOIS">
    <operation name="process">
    <input message="client:SendDataToOISRequestMessage"/>
    <output message="client:SendDataToOISResponseMessage"/>
    </operation>
    </portType>
    <binding name="SendDataToOIS" type="client:SendDataToOIS">
    <http:binding verb="POST"/>
    <operation name="process">
    <http:operation location="/Class1"/>
    <input>
    <mime:mimeXml part="xmldata"/>
    <mime:content type="text/xml"/>
    </input>
    <output>
    <mime:mimeXml part="payload"/>
    <mime:content type="text/xml"/>
    </output>
    </operation>
    </binding>
    <service name="SendDataTOOISService">
    <port name="SendDataToOIS" binding="client:SendDataToOIS">
    <http:address location="http://localhost:8888/j2ee/servlet"/>
    </port>
    </service>
    <plnk:partnerLinkType name="SendDataToOIS">
    <plnk:role name="SendDataToOISProvider">
    <plnk:portType name="client:SendDataToOIS"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

    In the bpel you can make a http-binding instead of the default soap-binding.
    Maybe this can help you making the call to the servlet/jsp.

  • HTTP POST binding not available in 11g???

    Hi,
    I am trying to call a HTTP service using HTTP POST, passing HTTP params to it. I created a small bpel process in 10.1.3.4, and used the HTTP POST samples, which worked out really well.
    However target platform is 11g. So I just tried to migrate the project and got the following warnings.
    WARNUNG: UPGBPEL-02043: The WSDL used for "HTTPPostParam" has HTTP based binding definition for the porttype specified. SOA Suite 11g does not support this and hence upgrade will not carry this over to the generated composite. Compilation will fail if the composite reference is not setup with binding. After upgrade, setup the reference by specifying a WSDL with SOAP binding. Check SOA Upgrade guide for more information.
    WARNUNG: UPGBPEL-02009: No Binding setup for : "HTTPPostParam". This will cause compilation of the upgraded project to fail. Check SOA Upgrade documentation on manual steps necessary to bind this composite reference. If necessary, upgrade and deploy any dependencies. If planning to retain 1013x nodes in this projects dependency tree, check earlier part of this log for 1013x WSDL URLs that can be used.
    Does this really tell me that HTTP post or get is not available anymore? Or do I miss anything? Or is there a workaround?
    Thanks and regards,
    Thomas
    PS: This is my POSTParam WSDL, which is not yet complete, but working on 10.1.3.4
    <?xml version="1.0" encoding="utf-8"?>
    <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://http.oracle.com/postParam"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    targetNamespace="http://http.oracle.com/postParam"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:get="http://xmlns.oracle.com/HttpClientBPELProcess">
    <types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema">
    <xsd:import schemaLocation="HttpClientBPELProcess.xsd"
    namespace="http://xmlns.oracle.com/HttpClientBPELProcess"/>
    </xsd:schema>
    <!--
    <xsd:schema elementFormDefault="qualified"
    targetNamespace="http://http.oracle.com/postParam">
    <xsd:element name="param" nillable="true" type="xsd:string"/>
    </xsd:schema>
    -->
    </types>
    <message name="HttpPostParamIn">
    <part name="HighwayEndpointId" type="xsd:string"/>
    <part name="HighwayMessageId" type="xsd:string"/>
    <part name="HighwayMessage" type="xsd:string"/>
    <part name="Synchronous" type="xsd:string"/>
    <part name="DISABLE_MESSAGEINPUT_ECHO" type="xsd:string"/>
    </message>
    <message name="HttpPostParamOut">
    <part name="Body" element="get:Request"/>
    </message>
    <portType name="HttpPostParamPortType">
    <operation name="PostData">
    <input message="tns:HttpPostParamIn"/>
    <output message="tns:HttpPostParamOut"/>
    </operation>
    </portType>
    <binding name="HttpPostParamBinding" type="tns:HttpPostParamPortType">
    <http:binding verb="POST"/>
    <operation name="PostData">
    <http:operation location="/highway/http/SubmitMessage"/>
    <input>
    <mime:content type="application/x-www-form-urlencoded"/>
    <!--
    <mime:content type="text" part="param1"/>
    <mime:content type="text" part="param2"/>
    -->
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    </binding>
    <service name="PostParamService">
    <port name="HttpPostParamPort" binding="tns:HttpPostParamBinding">
    <http:address location="http://itrax03.wlgore.com:8080"/>
    </port>
    </service>
    <plnk:partnerLinkType name="PostParamService">
    <plnk:role name="PostParamServiceProvider">
    <plnk:portType name="tns:HttpPostParamPortType"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

    The sample that heidi posted above is basically the codebase to the http binding we are planning to ship with Patchset 2. It's based on Jax-WS' http binding.
    Let me know if you run into any issues (the source is included - so you can play around :) - no license )

  • HTTP POST from SAP to an external server

    Experts.
    I have a XML file encased in MIME and SOAP format. Essentially it's a .xml file.
    I need to post this to an external server (have the IP address and logon credentials) using http post functionality.
    Can this be accomplished in SAP using ABAP, Function module? I need to post the entire file.
    If anyone has done this, can you please post the steps needed?
    Thank you so much.
    Raj

    Hi Raj,
    a good starting point for you would be the SAP Help. [Here|http://help.sap.com/saphelp_nw04/helpdata/en/1f/93163f9959a808e10000000a114084/frameset.htm] is some sample code of how to make a HTTP call from ABAP.
    Cheers
    Graham Robbo
    Edited by: Graham Robinson on Oct 28, 2009 2:44 PM

  • How to Invoke service using HTTP POST in BPEL?

    I have a client using .net service with a web page http://.../httpreceive.aspx which is invoke through an http post. How can we post xml message using http post to the url in BPEL. Are there any documentation on doing this? Will this require writing a java class to do an http post the xml message to the url?
    Edited by: sns724 on Feb 12, 2009 11:56 AM

    I created a wsdl with the http-binding to do a HTTP Post and I'm getting a com.collaxa.cube.ws.wsif.providers.http.WSIFOperation_HTTP@1ac9964 : Could not invoke 'process'; nested exception is: java.lang.NullPointerException.
    Here's my wsdl with the binding:
    <definitions name="TestHTTPost" targetNamespace="http://test.com"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://test.com"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
    <schema attributeFormDefault="qualified" elementFormDefault="qualified"
    targetNamespace="http://hyphen.com"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="AddressBookEntry">
    <complexType>
    <sequence>
    <element name="AddressBookNumber" type="string"/>
    <element name="Name" type="string"/>
    <element name="AddressLine1" type="string"/>
    <element name="AddressLine2" type="string"/>
    <element name="City" type="string"/>
    <element name="State" type="string"/>
    <element name="PostalCode" type="string"/>
    <element name="Phone" type="string"/>
    <element name="Fax" type="string"/>
    <element name="Email" type="string"/>
    <element name="ElectDest" type="string"/>
    </sequence>
    </complexType>
    </element>
    <element name="PostMessageResult">
    <complexType>
    <sequence>
    <element name="Result" type="string"/>
    <element name="Errors">
    <complexType>
    <sequence>
    <element name="Error">
    <complexType>
    <sequence>
    <element name="ErrorDescription" type="string"/>
    <element name="ErrorSource" type="string"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    </schema>
    </types>
    <message name="HTTPPostServiceRequestMessage">
    <part name="payload" element="tns:AddressBookEntry"/>
    </message>
    <message name="HTTPPostServiceResponseMessage">
    <part name="payload" element="tns:PostMessageResult"/>
    </message>
    <portType name="HTTPPostService">
    <operation name="process">
    <input message="tns:HTTPPostServiceRequestMessage" />
    <output message="tns:HTTPPostServiceResponseMessage"/>
    </operation>
    </portType>
    <binding name="HTTPPost" type="tns:HTTPPostService">
    <http:binding verb="POST"/>
    <operation name="process">
    <http:operation location="/httpreceive.aspx"/>
    <input>
    <mime:mimeXml part="payload"/>
    <mime:content type="text/xml"/>
    </input>
    <output>
    <mime:mimeXml part="payload"/>
    <mime:content type="text/xml"/>
    </output>
    </operation>
    </binding>
    <service name="HTTPPostService">
    <port name="HTTPPost" binding="tns:HTTPPost">
    <http:address location="https://testxml.solutions.com"/>
    </port>
    </service>
    <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PARTNER LINK TYPE DEFINITION
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
    <plnk:partnerLinkType name="HTTPPostService">
    <plnk:role name="HTTPPostServiceProvider">
    <plnk:portType name="tns:HTTPPostService"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

  • Http post with bpel

    I am not sure if this forum is the right forum for my question but I post anyway to see if anyone can help
    me. I have created a very simple bpel using http post; all it does is to copy the input to the output.
    The output from my bpel looks like this:
    <myContact xmlns="http://xml.netbeans.org/schema/XmlPost">
    <ns0:LastName xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" />
    <ns0:FirstName xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" />
    <ns0:EmailAddress xmlns:ns0="http://xml.netbeans.org/schema/XmlPost">
    LastName=aa&FirstName=bb&EmailAddress=cc&OfficeAddress=dd</ns0:EmailAddress>
    <ns0:OfficeAddress xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" />
    </myContact>
    My question is why the EmailAddress element contains all my input data. I should expect the lastname element
    has 'aa', the firstname element has 'bb', the emailAddress has 'cc' and the officeAddress has 'dd'.
    Can someone please tell me what I do wrong in here.
    Thanks,
    ================================================================================================
    Here's my html page to call the bpel process:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <form action="http://localhost:18182/XmlPostServiceService/XmlPostServicePort/submit" method="POST">
    Last Name: <input type="text" name="LastName" value="" size="10" />
    First Name: <input type="text" name="FirstName" value="" size="10" />
    Email Address: <input type="text" name="EmailAddress" value="" size="10" />
    Office Address: <input type="text" name="OfficeAddress" value="" size="10" />
    <input type="submit" value="post" />
    </form>
    </body>
    </html>
    ==================================================================================================
    Here is the xsd file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.netbeans.org/schema/XmlPost"
    xmlns:tns="http://xml.netbeans.org/schema/XmlPost"
    elementFormDefault="qualified">
    <xsd:complexType name="MyContact">
    <xsd:sequence>
    <xsd:element name="LastName" nillable="true" type="xsd:string"/>
    <xsd:element name="FirstName" nillable="true" type="xsd:string"/>
    <xsd:element name="EmailAddress" nillable="true" type="xsd:string"/>
    <xsd:element name="OfficeAddress" nillable="true" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="myContact" nillable="true" type="tns:MyContact"/>
    </xsd:schema>
    =================================================================================================
    Here is my bpel file:
    <?xml version="1.0" encoding="UTF-8"?>
    <process
    name="XmlPost"
    targetNamespace="http://enterprise.netbeans.org/bpel/XmlPost/XmlPost"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://enterprise.netbeans.org/bpel/XmlPost/XmlPost" xmlns:ns1="http://j2ee.netbeans.org/wsdl/XmlPostService" xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" xmlns:ns2="http://enterprise.netbeans.org/bpel/LogServiceServiceWrapper" xmlns:ns3="http://service.log.com/">
    <import namespace="http://j2ee.netbeans.org/wsdl/XmlPostService" location="XmlPostService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
    <partnerLinks>
    <partnerLink name="PartnerLink1" partnerLinkType="ns1:XmlPostService1" myRole="XmlPostServicePortTypeRole"/>
    </partnerLinks>
    <variables>
    <variable name="XmlPostServiceOperationOut" messageType="ns1:XmlPostServiceOperationReply"/>
    <variable name="XmlPostServiceOperationIn" messageType="ns1:XmlPostServiceOperationRequest"/>
    </variables>
    <sequence>
    <receive name="Receive1" createInstance="yes" partnerLink="PartnerLink1" operation="XmlPostServiceOperation" portType="ns1:XmlPostServicePortType" variable="XmlPostServiceOperationIn"/>
    <assign name="Assign1">
    <copy>
    <from variable="XmlPostServiceOperationIn" part="LastName"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:LastName</to>
    </copy>
    <copy>
    <from variable="XmlPostServiceOperationIn" part="FirstName"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:FirstName</to>
    </copy>
    <copy>
    <from variable="XmlPostServiceOperationIn" part="EmailAddress"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:EmailAddress</to>
    </copy>
    <copy>
    <from variable="XmlPostServiceOperationIn" part="OfficeAddress"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:OfficeAddress</to>
    </copy>
    </assign>
    <reply name="Reply1" partnerLink="PartnerLink1" operation="XmlPostServiceOperation" portType="ns1:XmlPostServicePortType" variable="XmlPostServiceOperationOut"/>
    </sequence>
    </process>
    ======================================================================================================
    Here's my wsdl file:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="XmlPostService" targetNamespace="http://j2ee.netbeans.org/wsdl/XmlPostService"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns="http://xml.netbeans.org/schema/XmlPost"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="http://j2ee.netbeans.org/wsdl/XmlPostService">
    <types>
    <xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/XmlPostService">
    <xsd:import namespace="http://xml.netbeans.org/schema/XmlPost" schemaLocation="XmlPost.xsd"/>
    </xsd:schema>
    </types>
    <message name="XmlPostServiceOperationRequest">
    <part name="LastName" type="xsd:string"/>
    <part name="FirstName" type="xsd:string"/>
    <part name="EmailAddress" type="xsd:string"/>
    <part name="OfficeAddress" type="xsd:string"/>
    <!-- part name="request" element="ns:myContact"/ -->
    </message>
    <message name="XmlPostServiceOperationReply">
    <part name="outcome" element="ns:myContact"/>
    </message>
    <portType name="XmlPostServicePortType">
    <operation name="XmlPostServiceOperation">
    <input name="input1" message="tns:XmlPostServiceOperationRequest"/>
    <output name="output1" message="tns:XmlPostServiceOperationReply"/>
    </operation>
    </portType>
    <binding name="XmlPostServiceBinding" type="tns:XmlPostServicePortType">
    <http:binding verb="POST"/>
    <operation name="XmlPostServiceOperation">
    <http:operation location="submit"/>
    <input name="input1">
    <http:urlEncoded/>
    </input>
    <output name="output1">
    <mime:mimeXml part="outcome"/>
    </output>
    </operation>
    </binding>
    <service name="XmlPostServiceService">
    <port name="XmlPostServicePort" binding="tns:XmlPostServiceBinding">
    <http:address location="http://localhost:18182/XmlPostServiceService/XmlPostServicePort"/>
    </port>
    </service>
    <plnk:partnerLinkType name="XmlPostService1">
    <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes.
    In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
    A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
    <plnk:role name="XmlPostServicePortTypeRole" portType="tns:XmlPostServicePortType"/>
    </plnk:partnerLinkType>
    </definitions>
    ================================================================================================

    sure you send the right xml?
    what I would try is to copy the xml from the receive, paste and extend it, and see if this works . . these errors are mostly because of no namespace defined or such ..
    sure your element has the right namespace?
    hth clemens
    2)
    here is the xml for the following schema ..
    XML
    <ns1:AttributetestProcessRequest xmlns:ns1="http://xmlns.oracle.com/Attributetest">
    <ns1:input/>
    </ns1:AttributetestProcessRequest>
    schema
    schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/Attributetest"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="AttributetestProcessRequest">
              <complexType>
                   <sequence>
                        <element name="input" type="string"/>
                   </sequence>
    <attribute name="service" use="required" type="string"/>
              </complexType>
         </element>
         <element name="AttributetestProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    </schema>
    it works design and runtime in 10.1.3.1
    Message was edited by:
    clemens.utschig

  • Where does firefox cache the form parameters to be used in the reload event of a page that was the resposne of a HTTP POST request?

    Suppose there is form in a web page and it submits data in HTTP POST method. After submitting the form, if I reload the page [either by the refresh button or back button; whichever applicable], firefox asks permission to resend the form data by saying "To display this page, Firefox must send information that will repeat any action...". Now if the user clicks on the resend, firefox resubmits the form data.
    So where does firefox store this from data for such future resending/resubmission?
    Is it possible to retrieve/manipulate those stored form data?

    I thought I'd tried that, as tried lots of other things like encoding URL, but obviously not as this works.
    Thanks for the quick reply.
    We also have an issue with the people results not being able to be refined by Department or Job Title now we have connected the SP2010 farm to use the service applications from a SP2013 farm.
    Any ideas on this?  I've started a new thread as its unrelated though:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c89d5463-4531-4a28-9586-1f690c7b580d/can-you-refine-people-search-results-using-a-sharepoint-2013-search-service-application-connected-in?forum=sharepointsearch

  • Sending a dom via http Post

    Hi,
    for some reason unknown to me whenever I try to send a dom via http Post I get the following error:
    org.xml.sax.SAXParseException: The root element is required in a well-formed document.
    This is the source code:
    package com.cyberrein.payunion.transaction;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    //xml lib
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    //weblogic xml lib
    import weblogic.apache.xerces.dom.DocumentImpl;
    import weblogic.apache.xml.serialize.DOMSerializer;
    import weblogic.apache.xml.serialize.XMLSerializer;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    public class Xmltest extends HttpServlet {
    //Initialize global variables
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    //Process the HTTP Request
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    // Retrieve transaction data from HttpServletRequest.
    try {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setValidating(false);
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document docIn = db.parse(request.getInputStream());
    String code = "XX";
    String tranID = "000000";
    String message = "This Card Is Invalid. Transaction Discontinued";
    //Output dom
    Document docOut = new DocumentImpl();
    Element e = (Element)docOut.createElement("TransactionResponseData");
    e.setAttribute("Code", code);
    e.setAttribute("TransactionID", tranID);
    e.setAttribute("Message", message);
    docOut.appendChild(e);
    FileOutputStream fos;
    fos = new FileOutputStream("/victory");
    DOMSerializer serX = new XMLSerializer(fos,null);
    serX.serialize(docIn);
    DOMSerializer ser = new XMLSerializer(response.getOutputStream(), null);
         ser.serialize(docOut);
         } catch (Throwable e) {e.printStackTrace();}
    //Get Servlet information
    public String getServletInfo() {
    return "com.cyberrein.payunion.transaction.Xmltest Information";
    package com.cyberrein.payunion.transaction;
    import org.w3c.dom.*;
    import org.apache.xerces.*;
    import org.apache.xerces.dom.*;
    import org.apache.xerces.parsers.*;
    import org.apache.xml.serialize.*;
    import org.xml.sax.*;
    import java.net.*;
    import java.io.*;
    public class CardClient {
    private String sURI;
    public BufferedReader in
    = new BufferedReader(new InputStreamReader(System.in));
    public CardClient(String serverURI) {
    sURI = serverURI;
    public Document test(){
    Document docIn = null;
    try
    //XML Document impl
         docIn = new DocumentImpl();
    //Create the root element
         Element t = docIn.createElement("TransactionData");
    Element k = docIn.createElement("Payunion.com");
    k.appendChild( docIn.createTextNode("North American server") );
    t.appendChild(k);
    //Set attributes
    t.setAttribute("cardnumber", "4444444444444444");
    t.setAttribute("amount", "3000.67");
    t.setAttribute("name", "tolu agbeja");
    t.setAttribute("cvv2", "001");
    t.setAttribute("pu_number", "ejs:pupk:23456");
    t.setAttribute("expirydate", "0903");
    t.setAttribute("address", "100 peachtree industrial");
    t.setAttribute("zipcode", "30329");
    docIn.appendChild(t);
    catch (Throwable te)
    te.printStackTrace();
    return docIn;
    public Document sendRequest(Document doc) {
         Document docOut = null;
         try {
         URL url = new URL("http://" + sURI);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
    conn.setRequestMethod("POST");
         conn.setDoInput(true);
         conn.setDoOutput(true);
         OutputStream out = conn.getOutputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    XMLSerializer ser = new XMLSerializer( out, new OutputFormat("xml", "UTF-8", false) );
    ser.serialize(doc);
    while(!br.ready()){}
         DOMParser parser = new DOMParser();
         parser.parse(new InputSource(br));
         docOut = parser.getDocument();
    catch (Throwable et)
         et.printStackTrace();
         return docOut;
    public static void main(String []args)
    CardClient c = new CardClient("cyber1:7001/xmltest");
    try
    Document doc = c.sendRequest(c.test());
    Element responseMessage = (Element)doc.getElementsByTagName("TransactionResponseData").item(0);
    String message = responseMessage.getAttribute("Message");
    String tranID = responseMessage.getAttribute("TransactionID");
    String code = responseMessage.getAttribute("Code");
    System.out.println(message);
    System.out.println("");
    System.out.println("The Response Code Is: "+code);
    System.out.println("");
    System.out.println("The Transaction ID Is: "+tranID);
    catch(Exception ex)
    ex.printStackTrace();
    All comments will be appreciated!!

    Hi, thanks for your reply i knew the FileUplaod was the way forward.
    I read topics advising to use the FileUpload and tried the following but it did not seem to work ( i get an HTTP Internal Server error when i try that):
    try
    DiskFileUpload upload = new DiskFileUpload();
    boolean isMultipart = FileUpload.isMultipartContent(request);
    if( isMultipart )
    List items = upload.parseRequest( request );
    Iterator iter = items.iterator();
    while( iter.hasNext() )
    FileItem fileItem = ( FileItem ) iter.next();
    File uploadedFile = new File("myreceivedfile.zip");
    fileItem.write( uploadedFile );
    }catch (Exception e)
    System.out.println("RECEIVER: " + e.getMessage());
    Also DiskFileUpload,isMultipartContent and parseRequest have a line going through the middle (horizontal middle).
    Edited by: Overmars08 on Jun 23, 2009 5:35 AM
    Edited by: Overmars08 on Jun 23, 2009 5:36 AM

  • Http post to a url from a WebDynpro (Java) application

    Hi,
    I want to send http post parameters to a url from a WebDynpro (Java) component. I need to do this to send OCI catalog data back to SAP SRM.
    I found this thread:
    HTTP Post
    which suggests to use the the Suspend plug for this purpose.
    <quote>
    Sending POST parameters with Web Dynpro Suspend Plugs
    1) Define a an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map
    </quote>
    After adding the postParams parameter of type java.util.Map to the Suspend-plug the WebDynpro gives the following error during build:
    Outbound plug (of type 'Suspend') 'suspend_plug' may have at most two parameters: 'url' of type 'string' and 'postParams' of type 'Map'.
    I use SAP NetWeaver Developer Studio version 7.0.16.
    Does someone know a solution? I would highly appreciate it.
    Thanks in advance.
    Eric

    Hi,
    Please have a look at this thread,
    Pass Table as Input to Adaptive RFC
    Regards,
    Saravanan K

  • SOAP over HTTP/POST

    Hi everyone,
    I'd be eternally grateful if someone could provide me with a quick + easy solution to the following (basic?) task.
    I have a user form with the required parameters and a submit button. I have an XML schema which specifies the format for the soap requests and responses. How do I accept user input, wrap it into a soap request, send it via HTTP/POST to a server ( http://localhost:9999/xyz/xyz), wait for a soap response and display the response in a readable format to the user when they press the submit button? Not that hard is it?!
    Please try to be a specific as possible because I'm no Java expert. I'm just so confused with all the tutorials about wsdl, bpel, tomcat, jax ws, glassfish etc etc etc!
    I use netbeans and java app server 9, though I'm open to other IDEs/servers.
    Any help will be greatly appreciated,
    Ruth

    https://saaj.dev.java.net/source/browse/*checkout*/saSAAJ: aj/saaj-ri/docs/index.html
    The Java Web Services Tutorial:
    http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html
    (Chapter 5)
    SOAP Tutorial: http://www.w3schools.com/soap/default.asp

  • Is it possible for ODi to do a "https post" of an xml file?

    Hi,
    We would like to use ODI to read from a VIEW and within ODI transform to a target using an XSD to generate an XML file and then do a HTTPS POST. Would be grateful for any pointers.
    we also ran into issues while transforming using a target xsd. Listed below:
    Use Case Context: In an ODI interface, Data from a database view is mapped to a target XSD schema. A package is then created, wherein, in the first step, this interface is executed. Then, in the second and final step, data transferred to the target XSD schema is saved as an XML file using OdiSqlUnload function.
    Problems faced in the above mentioned use case:
    When the data from the target XSD schema is saved as an XML file using OdiSqlUnload function, the XML does not match the XSD, which was initially imported into ODI.
    Regards
    Shema

    Ask them!  Product Feedback
    This is a user to user forum.  We are all end users like yourself.  Know one here knows what Apple is going to do.

  • Retrieve data/files fro HTTP POST request in On-Demand process

    Hello,
    I would like to integrate https://github.com/blueimp/jQuery-File-Upload to my APEX 4.2 application inside XE11g. I would like to use this kind of jQuery component, multiple file upload, use Drag & Drop, image resize, size limit, filter extensions etc...
    This jQuery component and also others javascript uploaders sends data files to some defined URL. Developer need to build some servlet, php script or something on server side that will read files from HTTP request and stores it somewhere.
    Do you know how to do it in APEX? How can I read data from HTTP POST request in PL/SQL? Now I can only call my On-Demand application process from javascript, but I am not able to read any data from HTTP POST in it.
    Can I do it in APEX, or using MOD_PLSQL?
    I would like to implement this:
    1) some javascript uploader will call some URL of my application and sends HTTP POST with data files
    2) I will read data files from HTTP POST and store them into database
    3) I will create some HTTP response for javascript uploader
    Thank you for some tips

    I know about that existing plugin " Item Plugin - Multiple File Upload"
    But I doesn't work in IE and has only basic features. Licence for commercial use is also needed. I would like to use some existing jQuery plugin. There are many of these plugins with nice features. And only one problem is that I need to create some server side process/servlet/script.. that can recieve HTTP request, get files from it and stores them into DB.

  • File upload using http-post in OSB

    Hi All,
    I am trying to upload a file using http-post method in OSB.
    I have created a business service pointing to the service url, with http method post.
    and calling this business service from a proxy service.
    I am unable to send the form data to the business service.
    Please let me know how to send trhe form data and the file information.
    The error given by Business Service is-
    the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is text/plain
    Thanks in advance.
    Seemant
    Edited by: Seemant Srivastava on Oct 12, 2010 12:28 PM

    Hi Anuj,
    A sample HTML form code for. Post HTTP service-
    <html>
    <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>CSV File</title>
    </head>
    <body>
    <form method="post" enctype="multipart/form-data" action="http://xyz/UploadFile">
    <table>
    <tr>
    <td> Feed id </td>
    <td><input type="text" name="refid" value="" size="20"></td>
    </tr>
    <tr>
    <td> Username (optional)</td>
    <td><input type="text" name="username" value="" size="20"></td>
    </tr>
    <tr>
    <td> Password (optional)</td>
    <td><input type="password" name="password" value="" size="20"></td>
    </tr>
    <tr><td> Select CSV File </td>
    <td> <input type="file" name="upload" value="" width="30"/></td>
    </tr>
    <tr>
    <td><input type="submit" name="Ok" value="Go"> <input type="reset" name="reset" value="Reset"> </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    I need to pass all these information to OSB business service.

  • Specify file name of the document returned on the HTTP post

    Hello,
    we are submitting a PDF form by calling submitForm function:
    doc.submitForm
            cURL: "http://localhost/script",
            cSubmitAs: "XML"
    The server returnes data of type "Content-type: application/pdf" and as a result this aplication/pdf data is displayed in a new window in Acrobat Reader.
    The document in new window has name e.g. A9R3347.tmp, is it possible to force some concrete name ?
    We tried to send from server the http header:
    Content-Disposition: attachment; filename=\"custom_name.pdf\"
    or   
    Content-Type: application/pdf;         filename=custom_name.pdf
    but non of this works.
    1/ is it possible to set some custom name of the document, which is returned from a server in response of HTTP Post submit ?
    2/ is it possible to return other kind of data then application/pdf ? ( my tests with AR 9.3 with other formats failed).
    Thanks for any advice.

    See Oracle Metalink,
    ..Oracle Portal Technical Forum,
    ....Subject: PORTAL - uploading files (file attachments) with file names.
    This message thread outlines javascript code that automatically captures the filename during an upload.

Maybe you are looking for

  • Photoshop CC 2014 and Indesign CC 2014 crash when printing

    Ever since I installed the CC 2014 versions of Indesign and Photoshop, I am absolutely incapable of printing. As soon as the print dialog comes up, the programs crash. (I don't have this issue with Illustrator CC 2014.) It's quite frustrating. Fortun

  • Help required in upgrading from 8.1.5 to 8.1.7

    We are having our application running on forms 4.5 and oracle 8.1.5 on winNT and Win2k. Now for the time being we want to upgrade to oracle 8.1.7, for that I need all steps to be performed, can any one help me? Pls!!!

  • Master data queue updates thru /SAPAPO/TS_LCM_QUEUE_UPDATE

    Hello Experts, In our present solution, there are frequent master data changes impacting the performance of SNP applications. As per SAP recommendation we are planning to schedule /SAPAPO/TS_LCM_QUEUE_UPDATE program. I wanted to know following if any

  • Automatic application of ul/ol tags upon conversion

    I wanted to ask whether it was possible to have a style (list) that would automatically map an already existing list in a Word document to an HTML (ol/ul/li) list upon conversion.  In other words, if I have a numbered list in Word as follows: Fruits

  • Changes in Screen Saver Options?

    Hello, I just replaced my older Macbook Pro (about 3 years old) with a new Macbook Pro with Retina.  Anywho, I am trying to set up my stuff and on my old macbook I had a screen saver that started off as one picture and then moved out adding more and