Webservice with BasicAuthentication

Hi
has someone ever used a Webservice with BasicAuthentication
where the credentials have been set from the program rather than
from the login popup?
How has the header to be set?
Thanks

Hi,
You can download samples from [here|https://www.sdn.sap.com/irj/boc/samples]
Regards,
Shweta

Similar Messages

  • Problem when adding ABAP custom webservice with Visual Studio 2010

    Hi All,
    After creating a webservice for a custom RFC function developed in a ECC6.0 SAP machine, I tried to add it to a Visual Studio 2010 windows aplication (through a web reference connection).
    The sequence I've done is:
    - Create RFC in ABAP, with testing ok
    - Create a WEBSERVICE with the ABAP editor
    - Configured the webservice with SICF with:
         Procedure: Standard
         Logon data: standard R3 user
         Security requirement: Standard
         Authentication: Standard SAP User
    Then, in SOAMANAGER I copied the webservice URL and tried to add it to Visual Studio 2010, but it keeps asking me the user and password. I try to supply the R3 username and password but if fails.
    Why is ECC6.0 asking the user and passord if I've defined a SAP user for the login process?
    Is there any way to disable this?
    Thanks,
    Manuel Dias

    Hello Manuel,
    You can use the following code:
    CredentialCache cache = new CredentialCache();
          cache.Add(new Uri("WEBSERVICEURL:PORTNUMBER/"), "Basic", new NetworkCredential("USERNAME", "PASSWORD"));
    SAP needs a password.
    Kind regards,
    JK

  • XML error when Crystal report calling Webservice with Rampart (ws-security)

    Could you please advise me where I am doing wrong -
    I have designed the report using CR 2008 following a SAP document instructions but getting error. -
    1. Created a Class file and put it in the class folder -
    public class PasswordHandler implements CallbackHandler { public void handle(Callback[] callbacks) throws IOException,UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { WSPasswordCallback pwcb = (WSPasswordCallback)callbacks<i>; pwcb.setPassword("clientPassword"); return; } } -
    2. created wse_policy.xml with below content clientName com.rockalltech.action.reports.PasswordHandler -
    3.Also modified CRConfig.xml with below data com.PasswordHandler -
    Still I am getting Rampart error like below -
    [2009-06-02 18:04:26,977,,FATAL,com.crystaldecisions.data.xml] org.apache.axis2.AxisFault: org.apache.rampart.Rampart at org.apache.axis2.deployment.URLBasedAxisConfigurator.getAxisConfiguration(URLBasedAxisConfigurator.java:77) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromURIs(ConfigurationContextFactory.java:190) at com.crystaldecisions.data.xml.a.b.a(Unknown Source) at com.crystaldecisions.data.xml.a.a.a(Unknown Source) at com.crystaldecisions.data.xml.f.a(Unknown Source) at com.crystaldecisions.data.xml.f.int(Unknown Source) at com.crystaldecisions.data.xml.CRDB_XMLImpl.DbExecuteQuery(Unknown Source) at com.crystaldecisions.reports.queryengine.driverImpl.xml.XMLQueryDefinition.Execute(Unknown Source) Thomas Edited by: thomasjv on Jun 2, 2009 7:15 PM Edited by: thomasjv on Jun 3, 2009 10:45 AM Edited by: thomasjv on Jun 3, 2009 10:45 AM Edited by: thomasjv on Jun 3, 2009 10:46 AM

    Hi!
    Thanks for the help:
    - I give all proxy details. In HTTP and HTTPS proxy tabs too.
    one interesting thing:
    - We publicate the same WebService with HTTP and HTTPS prefix.
    - If I create a proxy for the WS with HTTP, everything is correct and works well.
    - If I create a proxy for the WS with HTTPS, gives the error written the previous posts. (And can't create the logical port with SOAMANAGER)
    I compare the 2 WSDL. It is the same, except the links. (HTTP and HTTPS) all others are same.
    - And why it is possible in both case (HTTP, HTTPS) to create the proxy with SE80 from the WSDL URL? (And after the logical port was failed)

  • Help with Consuming a Webservice with the compact framework

    Hi all,
    i want to consume a SAP WebService within .NET in a smart device application. When I create the proxy, I get the following procedure in the .cs class:
    <i>[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://www.sap.com/_-ICO_-CM_XML_CREATE", RequestElementName="_-ICO_-CM_XML_CREATE", RequestNamespace="urn:sap-com:document:sap:rfc:functions", ResponseElementName="_-ICO_-CM_XML_CREATE.Response", ResponseNamespace="urn:sap-com:document:sap:rfc:functions", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)][return: System.Xml.Serialization.XmlElementAttribute("SUBRC", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]public string ICOCM_XML_CREATE([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string ORDERNR, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string ROUTE, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string TESTRUN, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string TOURNO, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string XML_FILE_LOCAL, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string XML_FILE_SERVER, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] out string XML_STRING) {object[] results = this.Invoke("_ICO_CM_XML_CREATE", new object[] {ORDERNR,ROUTE,TESTRUN,TOURNO,XML_FILE_LOCAL,XML_FILE_SERVER});XML_STRING = ((string)(results[1]));return ((string)(results[0]));}</i>
    When I compile the project I get the follwing error for each occurance of the "Form" Attribute :
    "<b>'System.Xml.Serialization.XmlElementAttribute' does not contain a definition for 'Form'" </b>
    When I try to consume this webservice with a "normal" kind of application, such as a windows-application, everything is ok.
    But when trying to use it with the compact framework, the error occurs.
    Is anyone outhere who can help me?
    Thank you
    Regardings

    It seems that the "Form" property of the XmlElementAttribute was missing in Compact Framework 1.1. It does exist in Compact Framework 2.0.
    You can try removing the "Form=System.Xml.Schema.XmlSchemaForm.Unqualified" entries from the proxy, but I'm not sure of it will still correctly work: For in-parameter it should be Ok to skip "Form=", but for out-paramters and result it could have the effect that no data is received.
    In this case the best option may be to upgrade to Compact Framework 2.0.

  • WebService with multiple methods

    Hello to everybody.
    I need an help with the develop of a WebService that it comes with 2 methods: I have already created a lot of WebService in JCAPS6 with only one method and everything was gone well. I tried to implement a WebService with 2 or more method but when I tried to deploy the project I always received this error message: "Deploying application in domain failed; Deployment descriptor file META-INF/application.xml in archive [nameOfArchive]. Duplicate unique value [element] declared for identity constraint of element "application"."
    Theese are the steps that I have done:
    1) create an XSD for Input message
    2) create an XSD for Output message
    3) create a WebServiceDefinition with 2 methods "Method1" and "Method2" and all message (input/output) implemented
    4) create a BusinessProcess (bp1) to implement Method1 operation
    5) create a BusinessProcess (bp2) to implement Method2 operation
    6) create a Connectivity map whith "bp1" and "bp2" directly connected with a new "Web Service External Application"
    7) create a deployment profile
    The "Build" operation was gone well but the "Deploy" operation always returned me an exception.
    What can I do to develop this type of WebService?
    Anyone can help me?
    Thank you in advance.
    Best regards,
    Marco Tranquillin

    My collegue found a solution:
    1) create WSDL with 2 or more operations (with input,output and fault messages);
    2) drag & drop "Event Based Decision" element into Business Process;
    3) link "Start" to "Event based decision";
    4) link "Event based decision.end" to "End";
    5) link a scope (with inside what you want) with "Event based decision";
    6) choose your operation from WSDL and drag & drop it OVER the icon with the mail icon;
    7) link operation.reply with the output scope and with the element "Event Based Decision.end";
    Marco Tranquillin

  • Call a Webservice with SAML securty in PI 7.0

    Hi experts,
    I need to call a Webservice with SAML security from PI 7.0, Is It possible? or only It is possible with PI 7.1?
    Thanks in advance,
    Jose Manuel

    Hi Jose,
    Let me answer your questuion first :
    No, using PI 7.0 I dont think its posible..
    Below is a brief overview on SAML.
    SAML: It stands for Security Assertion Markup Language, it is an XML standard which is used to exchange security information between a service provider and an identity provider.
    Why we need it ???
    We have a concept called Principal Propagation in PI 7.1, Principal Propagation allows to securely pass the identity of a user from a sender application to a receiver application. There are various adapters and protocols which support the Principal Propagation and one protocol amongst them is the Webservice Reliable Messaging Protocol or WS-RM. Principal Propagation solution for WS-RM protocol is based on SAML and uses the SAML assertions.
    There are some video recordings available for configuration and you can view the same as below,
    Configure a Trust Relationship between Sender and Integration Server: Exchange sender's digital certificate between sender and Integration Server.
    Configure Trusted Issuer: Map user in the Integration Server, and specify issuer. Default issuer is the sender's system ID, default attester is the sender's certificate.
    Configure Sender Agreement and Sender Communication Channel: In Integration Directory, select SAML Sender Vouches Assertion as authentication method.
    Regards,
    Divya

  • Consume WebService with Assertion Ticket in CE 7.2

    Hi masters
    I am using netweaver ce 7.2 and the problem is that I just can consume webservices with User ID/Password (Basic), but I need to do that with something like Assertion Ticked (like RFC connections)
    Does anybody could say me how to configure a WS connection with assertion ticked ?

    I solved by myself

  • Jdeveloper 11g : Generating webservices with streaming attachments support

    Hi,
    We are trying to create a Java Webservice with support for streaming attachments. In 10g we are using the Attachments API from the oracle.webservices.attachments package.
    In Jdev 10g we were doing it the following way:
    public String getXMLFile(String name,String fileName,Attachments atts) throws RemoteException
    try
    AttachmentFactory factory = AttachmentFactory.newInstance();
    Attachment imageAtt = factory.createAttachment(fileName, "text/plain", new FileInputStream(fileName));
    atts.getOutgoingAttachments().addAttachment(imageAtt);
    } catch (Exception e) {
    System.out.println(e.getMessage());
    return "Hello " + name;
    This webservice is deployed in Oracle AS.
    How do we do it in Jdev 11g and we want to deploy the service in WLS 10.1.3. If we try to create a webservice over this class in Jdev 11g we get the error :"no-arg default constructor not present".
    Any pointers would be highly appreciated.
    Thanks and Regards,
    Pritom

    Hi Vishal,
    I created the class as mentioned in the link. But when I try to test the web service, I get the following error :
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "oracle.apps.ddr.testFileDownload" failed to preload on startup in Web application: "Application7-Project1-context-root".
    javax.xml.ws.WebServiceException: Annotation @com.sun.xml.internal.ws.developer.StreamingAttachment(parseEagerly=true, dir=, memoryThreshold=40000) is not recognizable, atleast one constructor of class com.sun.xml.internal.ws.developer.StreamingAttachmentFeature should be marked with @FeatureConstructor
         at com.sun.xml.ws.binding.WebServiceFeatureList.getWebServiceFeatureBean(WebServiceFeatureList.java:176)
         at com.sun.xml.ws.binding.WebServiceFeatureList.parseAnnotations(WebServiceFeatureList.java:148)
         at com.sun.xml.ws.binding.WebServiceFeatureList.<init>(WebServiceFeatureList.java:113)
    Any ideas on how I can make it work ?
    Thanks and Regards,
    Pritom

  • How to invoke a WebService with more than 1 value in parameter?

    I have a webservice, with a request parameter as an Array of String.
    In an invoing xml it should looks like:
    <GetPersonsData_Request>
    <request>
    <PersonIdList>
    <string> 111 </string>
    <string> 222 </string>
    <string> 333 </string>
    </PersonIdList>
    A problem i have:
    How I can to assign a differents values to this list?
    i assigned first element directly and then tried to add a new one with append:
    <bpelx:append>
    <bpelx:from>'12345'</bpelx:from>
    <bpelx:to>$GetPersonsData_Request.parameters/ns2:request/ns5:PersonIdList</bpelx:to>
    </bpelx:append>
    I receive:
    <GetPersonsData_Request>
    <request>
    <PersonIdList>
    <string> 111 </string>
    '12345'
    </PersonIdList>
    </request>
    Its added as a single string, no as a Structure Element.
    What i missed???

    ok, i tried.
    add a new string type variable:
    <variable name="string" element="ns6:string"/>
    next assigned to $string my text and tried to append it to list:
    <bpelx:append>
    <bpelx:from>$string</bpelx:from>
    <bpelx:to>$GetPersonsData_Request.parameters/ns2:request/ns5:PersonIdList</bpelx:to>
    </bpelx:append>
    and as a result i receive a correct structure:
    <GetPersonsData_Request>
    <request>
    <PersonIdList>
    <string> 111 </string>
    <string> 12345 </string>
    </PersonIdList>
    </request>
    BUT!!! When i next use a countNode:
    <assign name="ac">
    <copy>
    <from>ora:countNodes('GetPersonsData_Request','parameters','ns2:request/ns5:PersonIdList/ns8:string') - it shows me 1 !!!
    <to>$counter</to>
    </copy>
    In EM:
    Updated variable "counter"
    <payload>
    <counter>
    <counter xsi:type="def:int">1</counter>
    </counter>
    Why???
    Is it really correct example and it should to work?

  • Async webservice with Callback

    Hi Experts,
    How to call a Asynchronous Microsoft webservice(Used callback mechanism) from XI?
    First I have to call the Microsoft webservice, it will return acknowledgement about the status. Again I have to invoke the webservice then it(microsoft) will return the response.
    How to do the above steps using XI? Please share your suggestions
    Regards
    Sara

    Hi Sara,
    Major thing is if ur  webservice accepts some data and gives some response, then both input and output should get imported into XI as seperate message types (Under Messages Tab) as shown in step 1 of ur referred weblog
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    So there u must have 2 messages: 1 for request and 1 for response. This depends upon ur wsdl structure. Once u get these messages, u could proceed with ur message mapping
    Steps are,
    1.import the wsdl file in Integration Repository in Integration Objects->external definitions.
    2.then create message types using the imported WSDL request and response.
    3.Other things are as usual.
    using SAP XI we can easily connect to webservices pls chk the links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c36ef6-dab9-2910-6ca9-a96b820de582
    /people/yomeshp.sharma/blog/2006/05/31/integrating-jdedwards-system-with-xi-using-iway-adapter-part--iii
    /people/anton.wenzelhuemer/blog/2006/03/05/integrating-php-and-abap-using-webservices
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    http://help.sap.com/saphelp_nwpi71/helpdata/en/11/e8179b247e4720882512a04041491d/frameset.htm
    Regards,
    Vinod.

  • WS security on webservices with JAX-WS Provider Interface

    Hi Experts:
    I have developed webservices with JAX-WS Provider Interface (WSProvider),it gives message level handling and also eliminates POJOs for user defined types; but how to add operation level Weblogic security policy on such services ?
    In my Weblogic console, I can see the endpoint of the service, and my services has at least 10 operations as defined in the WSDL, but I do not see operations details in the server console when I try to attach Weblogic security policy; so how do I add security rule to decide which operation is allowed by which user?
    am I missing something? or this is not possible ?  I am using WSProvider Interface and wondering is any issue because of that?  Or my operations should be visible regards of any JAX-WS standards implementation ?
    Thanks in advance!

    appaerently with the switch to the oc4j ws providers - a regression was introduced - bug 5665917 ... which is to be fixed for 10.1.3.3 ..
    pls contact oracle support to retrieve the patch ..
    /clemens

  • Is it possible to call a webservice with just the url to its WSDL

    hi all
    can anyone tell me if it is possible to call a webservice with just the url to its WSDL file. must we create the proxy class for webservice client? thanks

    if you are in the context of a J2EE 1.4 container, you do not need to generate any stub, you can use either a dynamic proxy mechanism or dynamic invocation.
    check JWSDP tutorial.

  • Problem invoking document type webservices with SAAJ

    I cannot invoke document type webservices with SAAJ. No problems invoking rpc-style services. Can anyone help me to invoke doc-type webservices with SAAJ. Very urgent. Thank you.

    Siva Sankar
    You may use Field Exit to do this enhancement. You can create fieldexit from report RSMODPRF.
    In order to use field exit check/activate Profile Parameter abap/fieldexit using t code RZ11.
    Thanks & regards
    Amol Lohade

  • Webservice with axis given a wsdl

    Hi all,
    I am a newbie to webservices, I have been given a wsdl from another company and I have been asked to develop a webservice with it. I would like to know the steps which I would be requiring to take inorder to build a webservice with axis. any help would be appreciated.
    I want to know how should i proceed by looking at the wsdl. The wsdl given is quite huge and big. any starting point would be helpful.

    hey neeeded a help.. you had followed jacobs instructions.. in that it says and i quote !
    1. delete the plugin folder, restart Eclipse, update the lib in the plugin folder
    Copy 2 files: "backport-util-concurrent-3.1.jar" and "geronimo-stax-api_1.0_spec-1.0.1.jar" from <Axis2Home_Location>/lib folder to the <Eclipse_Location>\plugins\Axis2_Codegen_Wizard_1.3.0\lib folder.
    2. Edit the plugins.xml file in the <Eclipse_Location>\plugins\Axis2_Codegen_Wizard_1.3.0 folder as follows:
    <runtime>
    <library name="lib/geronimo-stax-api_1.0_spec-1.0.1.jar">
    <export name="*"/>
    </library>
    <library name="lib/backport-util-concurrent-3.1.jar">
    <export name="*"/>
    </library>
    </runtime>
    then copy the plugin folder to eclipse plugin
    restarted Eclipse and it worked.
    fix worked fine for me with Eclipse WTP (Europa) and jdk1.5.0_07
    Now my question is if i delete the plugin folder, and try to restart Eclipse, Eclipse does not start, it says missiing jars ..
    I am sorry to bother you with so much questions ..
    thanks 1

  • RFC- WebServices with Security Features

    Hi
    I have to execute one scenario RFC - WebServices with security features. Kindly let me know where or how can I implement the secuirty features in this scenario. Any documentation/blog/ thread are welcome to undestand about implemeting the  secuirty features for this scenario.
    Regards
    Ramesh

    Hi Ramesh,
      Check this:
    http://help.sap.com/saphelp_nwpi71/helpdata/en/45/504971f7a708d2e10000000a11466f/frameset.htm
    http://help.sap.com/saphelp_nwpi71/helpdata/en/87/0827a8d6e04a2a8f822f9c51fa7ef2/frameset.htm
    and
    http://help.sap.com/saphelp_nwpi71/helpdata/en/37/1a9b6a338cca448508f3a48d2d1e2d/frameset.htm
    Regards,
    Ravi Kanth Talagana

Maybe you are looking for

  • Error code when signing in to use face time; 3121-2138-7457 any ideas to the problem?

    I recieve and error code when signing in to use facetime (3121-2138-7457) any information regarding how to correct this error code would be appreciated?

  • How to get current session language ?

    Hi, I want to get the current session's language. I'm using pageContext.getOANLSServices().toString() but its output is oracle.apps.fnd.framework.OANLSServices@f55137 Any ideas ? Thanks

  • Discoverer support for multiple hierarchies

    Hi all, is it true that Discoverer supports only a single hierarchy per Analytic Workspace dimension? If this is true what is the recommended work-around: - create an AW dimension per hierarchy? - forget about analytic workspaces and take a ROLAP app

  • Why isn't camera raw 8.3 compatible with PSE 11?

    I'm furious and want to know who to complain to. Less than one year ago I purchased PSE 11 which is what I needed for it to work with my Nikon D7100, also less than a year old. I have just purchased a Nikon D610 and it seems I need to downlaod Camera

  • On loggin trigger?

    I have a pl/sql block that will query a table for some handy data and save it to the session. I would like to do this once just after the user has logged in (and before all the portlets are called cause theyre going to want to access that data from t