Need JDeveloper Web Service with HTTP POST method

Hello all,
I am creating a Web Service from a java class using JDeveloper. The wsdl created uses a SOAP binding. When I test the web service, either through JDeveloper or by deploying to OAS, the HTTP request created uses the HTTP GET protocol. I am assuming that this would be the same for anybody doing this.
I need to know how to change it to be an HTTP POST protocol instead.
The reason that I need to try and use the POST method is that the xml needed by the service holds a lot of data and the http server is giving me a "URI too long" error. I have read and been told that using POST instead of GET would help this, but I can't figure out what to change to make this happen. I am not sure if I have to make a change in the generated wsdl or somewhere else. Or if it just won't work that way.
Any help you can provide would be appreciated.
Thanks,
rob

Hi Ayush,
Please refer -
http://biemond.blogspot.com/2010/08/http-basic-authentication-with-soa.html
Regards,
Anuj

Similar Messages

  • SSL Certificate necessary for web Service with HTTPS encoding?

    Hi experts,
    I wanna create a Web Service with HTTPS. Now when I create an endpoint in Transaction SOAMANAGER, I use "Transport Guarantee Type" HTTPS. I'm a little bit confused, becuase at "Authentication Method I have different options which I don't understand.
    At Authentication Method, there are some check boxes.
    Whats the difference between HTTP Authentication and Message Authentication?
    (Why) can I use User ID/Password as Authentication Method with HTTPS? I think I need X.509 SSL Client Certificate.
    What is a Logon Ticket?
    Is there a good Documentation in the web, who explains the meaning of the different options and when to use which option?
    Thanks and regards,
    Sebastian

    Hi,
    >>>WSDL in Integration Directoryb but that WSDL containt a like staring with the HTTP instead of HTTPS! My question is how to generate a wsdl file with an HTTPS url tot he web service,
    you don't use the URL from ID - you need to create one yourself and put it there in the generator
    Regards,
    Michal Krawczyk

  • UCM 11g web services with HTTP authentication

    Is it possible to setup UCM 11g web services with HTTP authentication?
    I did setup UCM 11g web services using OWSM policies and are working well.
    But my development team wants to consume web services with only HTTP authentication (simple user name and password), do not want to use Keystore files and encryption.
    Please help me guys.
    Thank you in advance

    Hi ,
    If you are looking to use the WSDL to execute ucm services then use SoapUI IDE on development , there it requires only the http authentication method .
    Let me know if this is the actual requirement which you were looking for or if I have missed the point .
    I use this to quickly test WSDL and verify if the service being invoked is actually correct or not .
    Thanks,
    Srinath
    Edited by: Srinath Menon on Apr 26, 2013 11:32 AM

  • Consuming Domino web service with JAXB encounters Method Response element

    I am able to consume a Domino R7 (Axis) web service with JAX-WS using Dispatch<SOAPMessage>. When I try using Dispatch<Object> however, JAXB throws an exception because it encounters an unexpected tag.
    The XML from the web service looks like this:
    <Envelope>
        <Body>
            <WebServiceMethodResponse>
                <WebServiceMethodReturn>
                    The meaning of life
                </WebServiceMethodReturn>
            </WebServiceMethodResponse>
        </Body>
    </Envelope>With Dispatch<SOAPMessage>, I can get to the meaning of life quickly using SOAPBody.getElementsByTagName( "WebServiceMethodReturn" ) but with Dispatch<Object>, it appears I must also create a class for the WebServiceMethodResponse element to make JAXB happy. I don't see this happening in other people's examples. Has the Return-element-within-Response-element design been eliminated in pure JAX-WS web services, or is this something that only IBM does?

    In case anyone's search leads them here, I've posted the solution at:
    *[http://www.pby.com/general.nsf/webarticles/dominowebservice01]*
    It is an exhaustive article (not "Hello World"!) that goes through several versions of the web service and client - hopefully explaining all+ pieces of the puzzle:
    ~ web service code,
    ~ WSDLs
    ~ schema
    ~ thoroughly-documented clients that do and do not use JAXB
    ~ ... that use generated artifacts
    ~ ... that customize existing POJOs
    ~ the SOAP messages generated in each direction
    ~ the necessary JAXB annotations
    ~ explanations of how the code works
    ~ explanations of how namespaces affect the code
    ~ on and on and on...
    My constant goal was to write an uncomplicated solution that uses as few artifacts (two) and annotations as possible. The end result is a small, fast JAX-WS 2.0 client that uses JAXB to invoke and consume a secured Domino 7 (1.4.2 JVM + AXIS) web service, using RPC/literal SOAP messages.

  • Web Services with HTTP Basic Auth

    Hi,
    I am having a problem connecting to web services which
    require HTTP Basic Authentication from a Flex application. I have
    useProxy set to true and call setRemoteCredentials prior to
    attempting the call, but the credentials do not appear to be set on
    the request (the request fails with fault.faultString = "HTTP
    request error", faultCode = "Server.Error.Request". The messages on
    the server indicate that the user name and password were not
    specified.
    I do have the proxy-config.xml file set up properly (I think
    -- I followed the example in the mx.rpc.soap.mxml.WebService class
    description, at least).
    I can verify that the WSDL (which doesn't require BASIC auth
    to access) is being loaded properly, but when I make the request,
    it fails. Is this a known problem?
    I am using Flex Builder 2.0.1 to build my SWF files.
    Thanks,
    Brendan

    Thanks for the pointer, I did try it, but it didn't help.
    As I said in the original post, the problem is with HTTP
    Basic Authentication, so adding a header for WSSE to the service
    request didn't help. It needs to be an HTTP Authorization header,
    not a SOAP Security header.
    Brnedan

  • Get a URL for web service with HTTPS

    Hi,
    After deploying all required configuration for secure WS, I'm trying to generate a wsdl to give to the third party. I m using the Despay WSDL in Integration Directoryb but that WSDL containt a like staring with the HTTP instead of HTTPS! My question is how to generate a wsdl file with an HTTPS url tot he web service,
    Thanks in advance,
    Fred.

    Hi,
    >>>WSDL in Integration Directoryb but that WSDL containt a like staring with the HTTP instead of HTTPS! My question is how to generate a wsdl file with an HTTPS url tot he web service,
    you don't use the URL from ID - you need to create one yourself and put it there in the generator
    Regards,
    Michal Krawczyk

  • Synchronous RFC-XI-Web Service with no request method

    Hello guys,
    I'm trying to set up an RFC-XI-Web Service scneario.  But with the particularitity that the WSDL does not have a request method. It only has a very simple response method.
    How can I make this? How can XI call the Web Service, if I dont have any request method?
    Thanks for your help.
    Felipe

    Matias, after some test I think that VJ is correct.
    It is failing at the moment of delivering the message to the WS, I'm getting the followin error messages:
    com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 302 Moved Temporarily
    I tested the WS with XMLspy and works correctly.
    I'm starting to believe that the best solution is to simply create a dummy request in the WS.
    It would be great if someone else test in their own and see if we get the same result.  Thanks,
    Felipe

  • Invoking web service with HTTP authentication using OdiInvokeWebService

    I did all configurations in OdiInvokeWebService Advanced Editor. When I press "Invoke web service" there are no errors. But when I try to execute this step there is an error:
    java.lang.IllegalArgumentException: Bad password format. Make sure that it's an encrypted password.
    Text of the command:
    OdiInvokeWebService "-URL=http://sapk02:8080/sap/bc/srt/rfc/sap/ZODI_FILE_SER?sap-client=800&wsdl=1.1" "-PORT_TYPE=ZODI_FILE_SER" "-OPERATION=ZODI_FILE" "-HTTP_USER=user" "-HTTP_PASS=_321321_"
    *<?xml version = '1.0' encoding = 'UTF8'?>*
    *<ZODI_FILERequest>*
    *<ZODI_FILE>*
    *<FILE>/tmp/temp1.txt</FILE>*
    *</ZODI_FILE>*
    *</ZODI_FILERequest>*
    When I fill HTTP password edit manually and try to execute there is another error:
    *com.sunopsis.wsinvocation.SnpsWSInvocationException: AxisFault*
    *faultCode: {http://xml.apache.org/axis/}HTTP*
    *faultSubcode:*
    *faultString: (401)Unauthorized*
    Text of the command:
    *OdiInvokeWebService "-URL=http://sapk02:8080/sap/bc/srt/rfc/sap/ZODI_FILE_SER?sap-client=800&wsdl=1.1" "-PORT_TYPE=ZODI_FILE_SER" "-OPERATION=ZODI_FILE" "-HTTP_USER=user" "-HTTP_PASS=*aIyHMmFSmTzVm1V08nTf"
    *<?xml version = '1.0' encoding = 'UTF8'?>*
    *<ZODI_FILERequest>*
    *<ZODI_FILE>*
    *<FILE>/tmp/temp1.txt</FILE>*
    *</ZODI_FILE>*
    *</ZODI_FILERequest>*
    ODI Version 11.1.1.3.0

    I've gotten past the original error by importing the security certificate of the Web service into my keystore/truststore. I'm also running the process on SOA 10.1.3.1.0. Now when I invoke the Web service from the BPEL process I get this error:
    exception on JaxRpc invoke: HTTP transport error:
    javax.xml.soap.SOAPException: java.security.PrivilegedActionException:
    javax.xml.soap.SOAPException: Bad response: 403 Forbidden
    I've tried passing the credentials every way I can -- partner link properties, Oracle Web Services Manager, whatever -- and still get the same error. I would expect to see a 401 error for problems with credentials, not a 403.
    Any suggestions?
    Thanks for your time.
    Paul Camann

  • Calling a Web Server with HTTP POST to retrieve XML in chunks

    Hi,
    I have to call a Web Server with the HTPP POST method by providing the user id and password. I am getting the xml as output from the web server in chunks. This is possible through net.HTTPUrlConnection Java Api. But does any body knows how to implement this through OSB.
    Regards,
    Anuj Maheshwari

    sample usage:
      CALL FUNCTION 'HTTP_POST'
        EXPORTING
          ABSOLUTE_URI                = IM_OFX_CONTROL_DATA-ADDRESS
          REQUEST_ENTITY_BODY_LENGTH  = RESPONSE_ENTITY_BODY_LENGTH
          RFC_DESTINATION             = IM_OFX_CONTROL_DATA-HTTP_RFCDEST
          USER                        = IM_OFX_CONTROL_DATA-HTTP_USER
          PASSWORD                    = IM_OFX_CONTROL_DATA-HTTP_PASSWORD
          BLANKSTOCRLF                = 'X'
        IMPORTING
          STATUS_CODE                 = STATUS
          STATUS_TEXT                 = STATUS_TEXT
          RESPONSE_ENTITY_BODY_LENGTH = RLENGTH
        TABLES
          REQUEST_ENTITY_BODY         = LT_REQUEST
          RESPONSE_ENTITY_BODY        = RESPONSE
          RESPONSE_HEADERS            = LT_RESPONSE_HEADERS
          REQUEST_HEADERS             = LT_HTTP_HEADERS
       EXCEPTIONS
            OTHERS                      = 1.
    Refer the programs:
    LFPIFF02            
    LOFXALSU04          
    LPRGN_URL_RESPONSEU01
    LSBCCU01            
    LSFTPU09            
    for some idea.
    regards,
    ravi

  • Web Services with https Security without PI

    Hi experts,
    We wanna create Web Services in SAP CRM 7.0 without using the PI. The Requirement is, that we have to use https. I haven't found much (and no clear) Information about this isue.
    Does anybody know if it is possible to use https and can you provide information how to do so?
    Thanks and regards,
    Sebastian

    yes its possible.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0d0a250-ccd1-2c10-9e9f-b9d5cf259a6d?QuickLink=index&overridelayout=true
    http://help.sap.com/saphelp_nw70ehp1/Helpdata/EN/e9/ae1b9a5d2cef4ea4b579f19d902871/content.htm
    Way you create webservice from function module is same in ECC and CRM so if you google, you would find all required information.
    Regards,
    BJ

  • Calling Web Service with Http Basic authentication in SOA 11g

    I am calling a webservice which has http basic authentication attached to it. Thus i am adding 'oracle/wss_http_token_client_policy' OWSM policy to the WS refrence in my composite in Jdeveloper,but it doesn't showme the option of providing the http Username and http Password. The only key it is showing me is cf.key.
    Am i missing some steps?
    Please let me know.
    Note - I am working on SOA 11.1.1.4.
    Regards
    Ayush

    Hi Ayush,
    Please refer -
    http://biemond.blogspot.com/2010/08/http-basic-authentication-with-soa.html
    Regards,
    Anuj

  • Invokation of Oracle J2eeWeb Services using HTTP POST

    I have created Oracle J2ee web service from a Java Class in Oracle Jdeveoper 10g. I want to invoke web methods in the web service using HTTP POST method. Currently, these web methods can be invoked using HTTP GET method which is the default option. Please suggest any solution for this.
    bye

    Vivek,
    If you want to make a call to Web Services from .NET, you have to generate a client proxy in your language of choice: C#, VB.NET, J#, ...
    There are two ways of doing so. a) from the command line using a tool named WSDL.EXE. b) from Visual Studio 2003 using the 'Add Web Reference' command.
    In either case, you will have to point to the WSDL of your service to generate the client proxy. The URL for the WSDL is the same as the URL for the service, with the ?WSDL parameter.
    Hope this helps,
    Eric

  • Issue with OSI PI WCF Web Service with wshttpbinding

    Hi Experts,
    System Details:
    SAP MII 14 SP4
    OSI PI Web Service: PITimeSeries
    I am having issue when trying to call OSI PI web service using http post. it is returning status 0 when i am using exception handler in BLS.
    Same web service works fine with basichttpbinding (SOAP 1.1)  but with wshttpbinding (SOAP 1.2) it is giving error.
    Following are Web config binding details for web service.
          <wsHttpBinding>
            <binding name="wsBinding_2011" sendTimeout="00:01:00" receiveTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
              <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
              <security mode="Message">
                <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" />
              </security>
            </binding>
          </wsHttpBinding>
    I am not sure it could be the issue with passing windows credentials.
    Did anybody consumed WCF web service with wshttpbinding with security mode as Message and clientCredentialType as Windows.
    Also i was trying to pass MYSAPSSO2 SSO token to service in http post but first i am not sure if this is correct windows token and second which header property of service should be mapped and i am not sure that I am going into correct direction or not.
    Please let me know what i am missing.
    I have tried following other options and tools:
    SOAP UI: basichttpbinding works fine for wshttpbinding receiving Internal Server error in log and Response as
                      The security context token is expired or is not valid.
    MII Web Service Action Block: basichttpbinding works fine for wshttpbinding not able to configure url through wizard because as per                                                                              my discussion with other MII experts MII does not support SOAP1.2. that is one reason for using http post.
    WCF Storm: both bindings works fine (There is option to select windows authentication and Impersonation level as delegation)
    WCF Test Client: Both bindings works fine
    Any help is appreciated.
    Thanks & Regards,
    Manoj Bilthare

    Hi Sam,
    The web service is valid following are details of testing on various tools.
    SOAP UI: basichttpbinding works fine for wshttpbinding receiving Internal Server error in log and Response as The security context token is expired or is not valid.
    MII Web Service Action Block: basichttpbinding works fine for wshttpbinding not able to configure url through wizard because as per my discussion with other MII experts MII does not support SOAP1.2. that is one reason for using http post.
    WCF Storm: both bindings works fine (There is option to select windows authentication and Impersonation level as delegation)
    WCF Test Client: Both bindings works fine
    Please let me know if additional details required.
    Thanks & Regards,
    Manoj Bilthare

  • Web Services with POST Bindings

    Hi,
    I am creating a web service with a method which takes a value from the user and inserts the value into the database .Now the value which is taken is of type 'long' and cannot be sent through the URL.
    As far as my understanding goes, the default SOAP binding that I am using currently uses the HTTP GET method,ie through the URL, to send the SOAP request. But the problem is that my Request is too big and I have to use the HTTP POST method.
    Now, my questions are as follows:
    1.Instead of using the default SOAP binding, can I use the HTTP POST bindings? IF yes, How do I go about it?
    2.Is there a way to specify to the SOAP to use HTTP POST( for example in the 'transport' attribute)?
    Thanks,
    Ramya.

    Normally, Oracle's stack expects a post binding and the SOAP client does it for you this way under the covers [1].
    We did add a get binding so that if you came in via a browser in Oracle9iAS 9.0.3 and OracleAS 10g 9.0.4 and later - we generate a home page and a parameter form from which you can test out the Web service when coming in via a browser.
    What SOAP client are you using? Are you constructing your own SOAP message, using Oracle's SOAP libraries or another package?
    Mike.
    [1]
    Sample SOAP client using Oracle's SOAP libraries
    public String sahHello(String test) throws Exception
    String returnVal = null;
    URL endpointURL = new URL(_endpoint);
    Call call = new Call();
    call.setSOAPTransport(m_httpConnection);
    call.setTargetObjectURI("MyWebService1");
    call.setMethodName("sayHello");
    call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    Vector params = new Vector();
    params.addElement(new Parameter("test", java.lang.String.class, test, null));
    call.setParams(params);
    call.setSOAPMappingRegistry(m_smr);
    Response response = call.invoke(endpointURL, "");
    if (!response.generatedFault())
    Parameter result = response.getReturnValue();
    returnVal = (String)result.getValue();
    else
    Fault fault = response.getFault();
    throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
    return returnVal;

  • Help Needed compile, deploy Web Service with Annotations on Web Logic 9.2

    Hi,
    I am new web logic and need some help in compiling, creating deployment file i.e. war, ear on Web Logic 9.2. I have the following sample web service with annotations code code but need help in compiling, creating deployment file (war,ear), creating proxy for testing etc. How to compile and create deployment files in WebLogic 9.2. Any help is really appreciated.
    package sample_ws;
    import java.rmi.RemoteException;
    import javax.jws.*;
    import javax.jws.soap.SOAPBinding;
    import org.w3c.dom.Document;
    @WebService
    @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL,
                 parameterStyle = SOAPBinding.ParameterStyle.BARE)
    public class EchoService {
        public EchoService() {
        @WebMethod(action="echo")
        @WebResult(targetNamespace="http://exa.org", name="echoResult")
        public Document echo(@WebParam(targetNamespace = "http://exa.org",
                                       name = "echoMsg")
            Document doc) throws RemoteException{
            return doc;
    }Thanks

    I am using Oracle Jdeveloper as an IDE and created a war file and deployed on Oracle App. Server it works fine. Now if I deploy the same war on Web Logic it gives me the following error:
    java.lang.IllegalStateException: could not find schema type named {{http}//exa.org}>>echoResult
    Errors were encountered while performing this operation. Here is the code I have:
    package webservice2 ;
    import java.rmi.RemoteException;
    import javax.jws.*;
    import javax.jws.soap.SOAPBinding;
    import org.w3c.dom.Document;
    @WebService
    @SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
                 use = SOAPBinding.Use.LITERAL,
                 parameterStyle = SOAPBinding.ParameterStyle.BARE)
    public class EchoService {
        public EchoService() {
        @WebMethod(action="echo")
        @WebResult(targetNamespace="http://exa.org", name="echoResult")
        public Document echo(@WebParam(targetNamespace = "http://exa.org",
                                       name = "echoMsg")
            Document doc) throws RemoteException{
            return doc;
    }And here is the wsdl file I have:
    <definitions
         name="EchoServiceService"
         targetNamespace="http://webservice2/"
         xmlns="http://schemas.xmlsoap.org/wsdl/"
         xmlns:tns="http://webservice2/"
         xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
         xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
         xmlns:ns1="http://exa.org"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        >
        <types>
            <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://exa.org" elementFormDefault="qualified"
                 xmlns:tns="http://exa.org" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
                <element name="echoMsg" nillable="true">
                    <complexType>
                        <sequence>
                            <any/>
                        </sequence>
                    </complexType>
                </element>
                <element name="echoResult" nillable="true">
                    <complexType>
                        <sequence>
                            <any/>
                        </sequence>
                    </complexType>
                </element>
            </schema>
        </types>
        <message name="EchoServicePortType_echo">
            <part name="echoMsg" element="ns1:echoMsg"/>
        </message>
        <message name="EchoServicePortType_echoResponse">
            <part name="echoResult" element="ns1:echoResult"/>
        </message>
        <portType name="EchoService">
            <operation name="echo">
                <input message="tns:EchoServicePortType_echo"/>
                <output message="tns:EchoServicePortType_echoResponse"/>
            </operation>
        </portType>
        <binding name="EchoServiceSoapHttp" type="tns:EchoService">
            <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
            <operation name="echo">
                <soap:operation soapAction="echo"/>
                <input>
                    <soap:body use="literal" parts="echoMsg"/>
                </input>
                <output>
                    <soap:body use="literal" parts="echoResult"/>
                </output>
            </operation>
        </binding>
        <service name="EchoServiceService">
            <port name="EchoServiceSoapHttpPort" binding="tns:EchoServiceSoapHttp">
                <soap:address location="http://localhost:8888/EnableSrc-WebService2-context-root/EchoServiceSoapHttpPort"/>
            </port>
        </service>
    </definitions>Any ideas what might be wrong.

Maybe you are looking for