401 Unauthorized Error When calling a SharePoint REST web service from SharePoint 2013 Workflow

We have our Workflow Manger installed on the same server as our SharePoint 2013 WFE development environment. When creating a SharePoint 2013 Workflow all Calls to a SharePoint 2013 REST web service results in a 401 Unauthorized error.
As an example I created a simple workflow that should return a JSON result. The REST Url returns the results in the browser without error.
Set Variable:webServiceUrl to https://<hostnamedsitecollection>/_vti_bin/client.svc/web/lists/getbytitle('ISR%20Approvers')/Items?$select=Title&$filter=Title%20eq%20%27General%27
then Build{...} Dictionary (Output to Variable:requestHeaders)
then Call [%Variable:webServiceUrl%] HTTP web service with request (ResponseContent to Variable:responseContent |ResponseHeaders to responseHeaders | ResponseStatusCode to Variable:responseCode)
The RequestHeader is set to the requestHeaders variable though the web service call properties
then Log Variable:responseCode to the workflow history list
After manually running the workflow in SharePoint on a list item in the ISR Approvers list it Logs "Unauthorized" in the Workflow History Log. It does this with every SharePoint REST web service call that I have tried through the workflow.
It doesn't have anything to do with the Workflow Manger being installed on the same machine as the SharePoint WFE does it?
Thank You for any insight

Hi,
According to your post, my understanding is that you had 401 Unauthorized Error when calling a SharePoint REST web service from SharePoint 2013 Workflow.
Please make sure you use the ‘Call HTTP Web Service’ correctly.
You can enter the URL into the brower to check whether it is correctly.
You need to
create the Request header requestHeaders
using a Dictionary:
Accept : application/json;odata=verbose
Content-Type : application/json;odata=verbose
To associate the
requestHeaders variable, select the Call action
property, set the RequestHeaders property to
requestHeaders.
Please refer to the following articles:
Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013
Calling the SharePoint 2013 Rest API from a SharePoint Designer
Workflow
In addtion, you need to make sure you install the workflow manager correctly.
More information:
Install and configure workflow for SharePoint Server 2013
Known Issues in Workflow Manager 1.0
Troubleshooting Workflow Manager 1.0 Management and Execution
Best Regards,
Linda Li
Linda Li
TechNet Community Support

Similar Messages

  • HTTP error when trying to access RESTful web service from application

    Hi,
    We are getting the following error when trying to access a RESTful web service coming from Apex workspace 4.2.1 and Apex listener 2.1:
    ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-29024: Certificate validation failure
    In the Debug report, besides the above I also see:
    error_backtrace: ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-06512: at "APEX_040200.WWV_FLOW_WEB_SERVICES", line 543 ORA-06512: at "APEX_040200.WWV_FLOW_WEB_SERVICES", line 1164 ORA-06512: at "APEX_040200.WWV_FLOW_PROCESS", line 396
    We get that error whether we use https or http in the URI pointing to the web service. When I test the Web Service in Workspace RESTful service GUI, I get the data back. When I go build an application with a report calling the RESTful Web Service I get that error. Both the Application and the Workspace RESTful services are on the same Apex environment and even the same workspace.
    What is odd is that I can actually put the URL of the web service into a browser and I get the data: (using the demo hr data in sample RESTful services.)
    IN browser-- https://weblogic-dev.edu/apex/ace/hr/empinfo/
    yields:
    7839,KING,PRESIDENT,,1981-11-17T05:00:00Z,5000,,10 7698,BLAKE,MANAGER,7839,1981-05-01T04:00:00Z,2850,,30 7782,CLARK,MANAGER,7839,1981-06-09T04:00:00Z,2450,,10 7566,JONES,MANAGER,7839,1981-04-02T05:00:00Z,2975,,20 7788,SCOTT,ANALYST,7566,1982-12-09T05:00:00Z,3000,,20 7902,FORD,ANALYST,7566,1981-12-03T05:00:00Z,3000,,20 7369,SMITH,CLERK,7902,1980-12-17T05:00:00Z,800,,20 7499,ALLEN,SALESMAN,7698,1981-02-20T05:00:00Z,1600,300,30 7521,WARD,SALESMAN,7698,1981-02-22T05:00:00Z,1250,500,30 7654,MARTIN,SALESMAN,7698,1981-09-28T04:00:00Z,1250,1400,30 7844,TURNER,SALESMAN,7698,1981-09-08T04:00:00Z,1500,0,30 7876,ADAMS,CLERK,7788,1983-01-12T05:00:00Z,1100,,20 7900,JAMES,CLERK,7698,1981-12-03T05:00:00Z,950,,30 7934,MILLER,CLERK,7782,1982-01-23T05:00:00Z,1300,,10
    Any ideas on what would be causing the Error above in our application?
    Thanks,
    Pat
    Edited by: patfmnd on Mar 11, 2013 3:25 PM
    In reviewing the above error, I think we are realizing that we have to have the Weblogic layer SSL cert (actually the CERT from our BigIP load balancer which also does our SSL termination) imported into the Oracle server wallet where Apex is installed. Am I correct?
    PM

    We resolved our problem. The Apex Administrative Guide made us realize that we had to set up Wallet path in the Instance. This required working with DBAs to follow the Advanced networking guide to get the wallet set up on our server. We then added that path to the Instance configuration. (Manager Instance --> Instance settings). We ran into another other issue related to our implementation of CAS but were able to resolve that, and 'voila' were able to get the sample RESTful service consumed by our application!!
    Now to the task of figuring out how to get Basic Auth working between client application and RESTful web service. If anyone has that working, let us know!!
    It would be helpful if in the documentation of the Apex 2.x listener or Apex install/configuration there was clear reference to the above steps required for HTTPS access to RESTful web services.
    Pat

  • Error when trying to create a web service from a wsdl file using jdeveloper

    Hello,
    I'm using the latest jdeveloper and jdk 6 update 20 on solaris sparc 10.
    When I'm trying to create a web service from a wsdl on the java EE 1.5 platform i get the following error:
    Validation failed:
    java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    I've tried the endorsed mechanism with the latest jaxws-api.jar and jaxb-api.jar packages with no help.
    It works fine when i use the java EE 1.4 platform....
    The full Error description:
    oracle.jdeveloper.webservices.model.WebServiceException: Error creating model from wsdl "file:/vobs/NMS/NorthBoundIF/MTOSI/MTOSI_Documentation/DDPs/ResourceTroubleManagement/IIS/wsdl/AlarmRetrieval/AlarmRetrievalHttp.wsdl": java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1635)+
    +     at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2846)+
    +     at oracle.jdeveloper.webservices.model.WebService.createServiceFromWSDL(WebService.java:2611)+
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.setDescription(JavaWebService.java:745)+
    +     at oracle.jdevimpl.webservices.wizard.jaxrpc.topdown.TDJaxWsSpecifyWsdlPanel.setDescription(TDJaxWsSpecifyWsdlPanel.java:364)+
    +     at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel.buildModel(SpecifyWsdlPanel.java:1109)+
    +     at oracle.jdevimpl.webservices.wizard.jaxrpc.common.SpecifyWsdlPanel$5.run(SpecifyWsdlPanel.java:661)+
    +     at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:655)+
    +     at java.lang.Thread.run(Thread.java:619)+
    Caused by: oracle.jdeveloper.webservices.tools.WsdlValidationException: Error creating model from wsdl "file:/vobs/NMS/NorthBoundIF/MTOSI/MTOSI_Documentation/DDPs/ResourceTroubleManagement/IIS/wsdl/AlarmRetrieval/AlarmRetrievalHttp.wsdl": java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.newWsdlValidationException(WsaAdaptor.java:825)+
    +     at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:515)+
    +     at oracle.jdeveloper.webservices.tools.WebServiceTools.getSeiInfo(WebServiceTools.java:523)+
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.getSeiInfo(JavaWebService.java:1741)+
    +     at oracle.jdeveloper.webservices.model.java.JavaWebService.createPortTypes(JavaWebService.java:1496)+
    +     ... 8 more+
    Caused by: oracle.j2ee.ws.common.tools.api.ValidationException: Error creating model from wsdl "file:/vobs/NMS/NorthBoundIF/MTOSI/MTOSI_Documentation/DDPs/ResourceTroubleManagement/IIS/wsdl/AlarmRetrieval/AlarmRetrievalHttp.wsdl": java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:664)+
    +     at oracle.j2ee.ws.tools.wsa.WsdlToJavaTool.createJAXWSModel(WsdlToJavaTool.java:475)+
    +     at oracle.j2ee.ws.tools.wsa.Util.getJaxWsSeiInfo(Util.java:1357)+
    +     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
    +     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)+
    +     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)+
    +     at java.lang.reflect.Method.invoke(Method.java:597)+
    +     at oracle.jdevimpl.webservices.tools.wsa.Assembler$2$1.invoke(Assembler.java:218)+
    +     at $Proxy34.getJaxWsSeiInfo(Unknown Source)+
    +     at oracle.jdevimpl.webservices.tools.wsa.WsaAdaptor.getSeiInfo(WsaAdaptor.java:505)+
    +     ... 11 more+
    Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.getMRequired(AbstractField.java:186)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReference(AbstractField.java:209)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:164)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:75)+
    +     at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:89)+
    +     at com.sun.tools.xjc.generator.bean.field.SingleField.<init>(SingleField.java:76)+
    +     at sun.reflect.GeneratedConstructorAccessor53.newInstance(Unknown Source)+
    +     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)+
    +     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)+
    +     at com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:64)+
    +     at com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:75)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:751)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:539)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:241)+
    +     at com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:181)+
    +     at com.sun.tools.xjc.model.Model.generateCode(Model.java:286)+
    +     at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:251)+
    +     at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)+
    +     at oracle.j2ee.ws.common.tools.databinding.jaxb20.JAXB20TypeGenerator.generateJavaTypes(JAXB20TypeGenerator.java:117)+
    +     at oracle.j2ee.ws.tools.wsa.SchemaTool.genValueTypes(SchemaTool.java:186)+
    +     at oracle.j2ee.ws.tools.wsa.jaxws.JaxwsWsdlToJavaTool.getJAXWSModel(JaxwsWsdlToJavaTool.java:647)+
    +     ... 20 more+
    Caused by: java.lang.NoSuchMethodException: com.sun.tools.xjc.generator.annotation.spec.XmlElementRefWriter.required(boolean)
    +     at java.lang.Class.getMethod(Class.java:1605)+
    +     at com.sun.tools.xjc.generator.bean.field.AbstractField.getMRequired(AbstractField.java:184)+
    +     ... 40 more+
    Thanks,
    Roy.

    Guys,
    You are asking about an issue that was a pain in the nick for me few months ago. The problem is that you won't find mych help here as I figured out that Apex geeks here either did not do much webservices or ended up hating it as i do :) . This is an error that can be due many different reason, let me ask you this:
    1- Does your the other system you are trying to call through webservices using HTTPS ?
    2- If yes, did you create a valid oracle wallet for that https connection ?
    3- Make sure you are using the correct URL ( am sure you do, just double check )
    4- If using a proxy, then you have to define that in the web service reference creation page
    provide more info and I hope I can help you with this,
    Sam
    Please reward good answers by marking them correct or helpful!

  • 401 Unauthorized error when calling a webservice

    Have ColdFusion 11 installed, I have created a hello web service and I am trying to call it.  Each time I try to call the web service I get an error 401 Unauthorized.  I am not sure if I need to configure something more on the ColdFusion server, IIS or something else.
    <cfcomponent displayname="Hello">
    <cffunction name="helloWorld" returntype="string" access="remote">
         <cfreturn "Hello World!">
        </cffunction>
    </cfcomponent>
    <cfinvoke
      webservice="http://MyServer/Hello.cfc?wsdl"
      method="helloWorld"
      returnvariable="ws" refreshwsdl="yes">
    </cfinvoke>
    <cfdump var="#ws#">

    It appears that you have inadvertently enforced HTTP authentication. If so, you will have to include the attributes, username="your_username" and password="your_password" in the cfinvoke tag.

  • Timestamp Error when calling Encrypt and Signed Web Service

    Hello,
    I maked one Web Service in the Oracle Service Bus 10gR3 that supports Encryption and Sign, basically inserting (manually) this on WSDL Contract:
    This two namespaces:
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
    This Declarations:
    <wsp:UsingPolicy Required="true"/>
    <input>
    <wsp:Policy>
    <wsp:PolicyReference URI="policy:Encrypt.xml"/>
    </wsp:Policy>
    <soap:body use="literal" />
    </input>
    <wsp:Policy>
    <wsp:PolicyReference URI="policy:Sign.xml"/>
    </wsp:Policy>
    The above declarations was inserted in the correct points inside the WSDL Contract and the Web Service is working correctly.
    The Problem is related to Sign.xml declaration, when i insert this declaration:
    <wsp:Policy>
    <wsp:PolicyReference URI="policy:Sign.xml"/>
    </wsp:Policy>
    Then, the Web Service shows an error. Following the Request and Resonse (That shows the error):
    Request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ger="http://www.abc.com.br/Service">
    <soapenv:Header/>
    <soapenv:Body>
    <ger:gerarHashSenha>
    <arg0>123456</arg0>
    </ger:gerarHashSenha>
    </soapenv:Body>
    </soapenv:Envelope>
    Response:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    *<faultstring>Can not retrieve header: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</faultstring>*
    </env:Fault>
    </env:Body>
    </env:Envelope>
    Observation: I was invoking the WebService using the soapUI Tool.
    I Tryed change the request to bellow code, but doesn't work:
    <soapenv:Envelope xmlns:ger="http://www.abc.com.br/Service" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsu:Timestamp wsu:Id="Timestamp-447" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsu:Created>2010-05-27T21:40:55.667Z</wsu:Created>
    <wsu:Expires>2010-05-27T21:41:55.667Z</wsu:Expires>
    </wsu:Timestamp>
    </wsse:Security>
    </soapenv:Header>
    <soapenv:Body>
    <ger:gerarHashSenha>
    <arg0>123456</arg0>
    </ger:gerarHashSenha>
    </soapenv:Body>
    </soapenv:Envelope>
    Thanks.
    Victor Jabur.

    someone has any idea ?
    Thanks

  • Error while calling MII transaction as web service from ABAP

    Hello Experts,
    I want to call a MII transaction from ABAP program, as a web service.
    Following is output of http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX  (TAG_TRX is name of my transaction).
      <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.sap.com/xMII" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
    - <!--  Types
      -->
    - <types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">
    - <s:complexType name="InputParams">
    - <s:sequence id="InputSequence">
      <s:element maxOccurs="1" minOccurs="0" name="WEIGHT" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="BATCHID" type="s:string" />
      </s:sequence>
      </s:complexType>
    - <s:element name="XacuteRequest">
    - <s:complexType>
    - <s:sequence>
      <s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:complexType name="Rowset">
    - <s:sequence>
      <s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row" />
      </s:sequence>
      <s:attribute name="Message" type="s:string" />
      </s:complexType>
    - <s:complexType name="Row">
      <s:sequence id="RowSequence" />
      </s:complexType>
    - <s:element name="XacuteResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </types>
    - <!--  Messages
      -->
    - <message name="XacuteSoapIn">
      <part element="s0:XacuteRequest" name="parameters" />
      </message>
    - <message name="XacuteSoapOut">
      <part element="s0:XacuteResponse" name="parameters" />
      </message>
    - <!--  Ports
      -->
    - <portType name="XacuteWSSoap">
    - <operation name="Xacute">
      <input message="s0:XacuteSoapIn" />
      <output message="s0:XacuteSoapOut" />
      </operation>
      </portType>
    - <!--  Bindings
      -->
    - <binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="Xacute">
      <soap:operation soapAction="http://www.sap.com/xMII" style="document" />
    - <input>
      <soap:body use="literal" />
      </input>
    - <output>
      <soap:body use="literal" />
      </output>
      </operation>
      </binding>
    - <!--  Service mapping
      -->
    - <service name="XacuteWS">
    - <port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
      <soap:address location="http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX" />
      </port>
      </service>
      </definitions>
    Now, when I am using http://<<server>>:50000/XMII/SOAPRunner/TAG_TRX to create a Enterprise Service in SAP (i.e. SE80 transaction-> Create Enterprise Service-> Service Consumer-> URL/HTTP Destination-> URL ... I am getting following error.
    Incorrect value: Entity "<<document>>"(5 /93 ). unexpected symbol: '<'     
    But, whenever I am using the same URL in MII BLS, it does not give any error. It correctly shows all input and output parameters.
    Please help me to resolve this issue.
    Regards
    Neeta.

    Now, I am able to create the Web Service in SAP and it is now showing the respective class, attribute and methods to execute this web service (web service to call MII transaction).
    But when I am calling it from ABAP (a simple Web Dynpro for ABAP method), it is showing me the following error:
    Error (id=GET_BUSINESS_SYSTEM_ERROR): An error occurred when determining the business system (LD_ERROR)
    Thought this error is coming from ABAP program, but I am sure that this is related to some configuration at SAP level. (Let me inform you that there are two different servers for SAP Web Dynpro ABAP and SAP MII.
    Please help.
    Thanks in advance.

  • (401) unauthorized error when accessing web service....

    Hello people! Can someone could possibly help me out. I'm try to consume a web service in .net technology. This was supposedly working already but lately I'm already given a (401) unauthorized error when consuming the web services. Here the code that was working couple of days ago....
    package samples;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.namespace.QName;
    public class LogIn
         private String url = "http://www-cebu/apps/webservices/fscservice.asmx?wsdl";
         private String action="FSC Services/LogIn";
         private String result="";
         private String username="";
         private String password="";
         private String domain="";
         public LogIn(String username, String password,String domain)
              this.username = username;
              this.password = password;
              this.domain = domain;
              try
                   Service service = new Service();
                   Call call = (Call)service.createCall();
                   call.setTargetEndpointAddress(new java.net.URL(url));
                   call.setOperationName(new QName("FSC Services/LogIn","LogIn"));
                   call.addParameter("username",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
                   call.addParameter("password",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
                   call.addParameter("domain",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
                   call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
                   call.setUseSOAPAction(true);
                   call.setSOAPActionURI(action);
                   result = (String)call.invoke(new Object[] {username,password,domain});
              catch (Exception e)
                   System.err.println(e.toString());
         public String getResult()
              return result;     
         public static void main(String [] args)
                   LogIn test = new LogIn("username","password","domain");     
                   System.out.println(test.getResult());
    }

    1. Use iFrame to show you report from Resporting Services in your Web App.
    Or :
    2. Use Report Viewer in your Web App if you use .NET, and use this code to pass your parameters :
    ReportViewer1.ServerReport.Credential = new System.Network.NetworkCredential(“your name”, “your password”, “your domain”);

  • Error when querying REST web services from web-based InfoPath form 2013 environment

    Error when querying REST web services from web-based InfoPath form 2013 environment, we are trying to consume REST web service in InfoPath form ( SharePoint 2013 version) 
    http://spapp/sites/litigation/Intake/_api/web/lists/getbytitle('Email%20Profiles')/items(1)
    it works in preview but does not when it is published. because of claim based authentication i m getting below error
    The form cannot run specified query, the underlying connection was closed. An expected error occurred 
    same works in 2010 environment .. are we missing anything in 2013 servers?? please let me know how we can resolve it.. thank you 
    guru

    everyone face this issue, nothing in event viewer, its easy to reproduce error at ur end also.. 
    just you need to use below web service in infopath and populate some data on form load like id = 1 pull the title and try to set in form any field...the
    list has one item thats all
    guru

  • How to call COPY web service from sharepoint in SAP

    Hello Experts,
    I want to call COPY web service from SharePoint in SAP  web dynpro / JAVA application.
    However, when I try to connect to web service and download wsdl using   http:// <hostname:port>/_vti_bin/copy.asmx?wsdl
    it results in Unauthorized error and doesnt complete the setup. Detail error is :
     Error occurred while downloading WSIL file. Error message: Deserializing xml stream  http:// <hostname:port>/_vti_bin/copy.asmx?wsdl
    failed.com.sap.engine.services.webservices.espbase.wsdl.exceptions.WSDLException: Invalid Response Code: (401) Unauthorized. The requested URL was:"Connect to 
    http:// <hostname:port>/_vti_bin/copy.asmx?wsdl , used user to connect: userid"
    I am trying to connect with server user account. Any idea on what authorizations might be required or any help on the scenario .
    -Abhijeet

    Here's an example on how to delete a list item, hopefully this helps
    package com.jw.sharepoint.examples;
    import java.io.File;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    import java.util.Date;
    import java.util.Properties;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.microsoft.sharepoint.webservices.CopySoap;
    import com.microsoft.sharepoint.webservices.GetListItems;
    import com.microsoft.sharepoint.webservices.GetListItemsResponse;
    import com.microsoft.sharepoint.webservices.ListsSoap;
    import com.microsoft.sharepoint.webservices.UpdateListItems.Updates;
    import com.microsoft.sharepoint.webservices.UpdateListItemsResponse.UpdateListItemsResult;
    public class SharePointDeleteListItemExample extends SharePointBaseExample {
     private String delete = null;
     private String deleteListItemQuery = null;
     private String queryOptions = null;
     private static final Log logger = LogFactory.getLog(SharePointUploadDocumentExample.class);
     private static Properties properties = new Properties();
     public Properties getProperties() {
      return properties;
      * @param args
     public static void main(String[] args) {
      logger.debug("main...");
      SharePointDeleteListItemExample example = new SharePointDeleteListItemExample();
      try {
       example.initialize();
       CopySoap cp = example.getCopySoap();
       example.uploadDocument(cp, properties.getProperty("copy.sourceFile"));
       ListsSoap ls = example.getListsSoap();
       example.executeQueryAndDelete(ls);
      } catch (Exception ex) {
       logger.error("Error caught in main: ", ex);
     public void executeQueryAndDelete(ListsSoap ls) throws Exception {
      Date today = Calendar.getInstance().getTime();
      SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
      String formattedDate = simpleDateFormat.format(today);
      String queryFormatted = String.format(deleteListItemQuery,formattedDate);  
      GetListItems.QueryOptions msQueryOptions = new GetListItems.QueryOptions();
      GetListItems.Query msQuery = new GetListItems.Query();
      msQuery.getContent().add(createSharePointCAMLNode(queryFormatted));
      msQueryOptions.getContent().add(createSharePointCAMLNode(this.queryOptions));
      GetListItemsResponse.GetListItemsResult result = ls.getListItems(
        properties.getProperty("folder"), "", msQuery, null, "",
        msQueryOptions, "");
      writeResult(result.getContent().get(0), System.out);
      Element element = (Element) result.getContent().get(0);
      NodeList nl = element.getElementsByTagName("z:row");
      for (int i = 0; i < nl.getLength(); i++) {
       Node node = nl.item(i);
       String id = node.getAttributes().getNamedItem("ows_ID").getNodeValue();
       String fileRefRelativePath = node.getAttributes().getNamedItem("ows_FileRef").getNodeValue();
       logger.debug("id: " + id);
       logger.debug("fileRefRelativePath: " + fileRefRelativePath);
       String fileRef = properties.getProperty("delete.FileRef.base") + fileRefRelativePath.split("#")[1];
       logger.debug("fileRef: " + fileRef);
       deleteListItem(ls, properties.getProperty("folder"), id, fileRef);
     public void deleteListItem(ListsSoap ls, String listName, String listId, String fileRef) throws Exception {
      String deleteFormatted = String.format(delete, listId, fileRef);  
      Updates u = new Updates();
      u.getContent().add(createSharePointCAMLNode(deleteFormatted));
      UpdateListItemsResult ret = ls.updateListItems(listName, u);
      writeResult(ret.getContent().get(0), System.out);
     public void initialize() throws Exception {
      logger.info("initialize()...");
      properties.load(getClass().getResourceAsStream("/SharePointDeleteListItemExample.properties"));
      super.initialize();
      this.delete = new String(readAll(new File(this.getClass().getResource("/Delete.xml").toURI())));
      this.deleteListItemQuery = new String(readAll(new File(this.getClass().getResource("/DeleteListItemQuery.xml").toURI())));
      this.queryOptions = new String(readAll(new File(this.getClass().getResource("/QueryOptions.xml").toURI())));
    Brandon James SharePoint Developer/Administrator

  • Calling a restful web service from a script task

    Hi.  I'm weak in c# but am looking to accomplish this...
    I want to call a RESTful web service from an ssis script task.  I don't want to create a web service so I'm hoping there is some publicly available one I can practice with before our web team provides me with the service I'll eventually use.  Can
    the community provide an example?  I wish I had more but my knowledge is very limited except for using ssis in more sql centric apps.  It would be great if I could exercise both a get and put verb but I understand i'll be lucky if I can even get
    a get to work. 
    Here is an example of a get I found on the web but I don't know if its a viable candidate for me to practice with from my package...
    using System;
    using System.IO;
    using System.Net;
    using System.Text;
    // Create the web request
    HttpWebRequest request = WebRequest.Create("http://developer.yahoo.com/") as HttpWebRequest;
    // Get response
    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
    // Get the response stream
    StreamReader reader = new StreamReader(response.GetResponseStream());
    // Console application output
    Console.WriteLine(reader.ReadToEnd());
    and in the same article an example of a put ...
    // We use the HttpUtility class from the System.Web namespace
    using System.Web;
    Uri address = new Uri("http://api.search.yahoo.com/ContentAnalysisService/V1/termExtraction");
    // Create the web request
    HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
    // Set type to POST
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    // Create the data we want to send
    string appId = "YahooDemo";
    string context = "Italian sculptors and painters of the renaissance"
    + "favored the Virgin Mary for inspiration";
    string query = "madonna";
    StringBuilder data = new StringBuilder();
    data.Append("appid=" + HttpUtility.UrlEncode(appId));
    data.Append("&context=" + HttpUtility.UrlEncode(context));
    data.Append("&query=" + HttpUtility.UrlEncode(query));
    // Create a byte array of the data we want to send
    byte[] byteData = UTF8Encoding.UTF8.GetBytes(data.ToString());
    // Set the content length in the request headers
    request.ContentLength = byteData.Length;
    // Write data
    using (Stream postStream = request.GetRequestStream())
    postStream.Write(byteData, 0, byteData.Length);
    // Get response
    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
    // Get the response stream
    StreamReader reader = new StreamReader(response.GetResponseStream());
    // Console application output
    Console.WriteLine(reader.ReadToEnd());
     

    Hi
    db042190,
    These kinds of operations are commonly found outside the SSIS section of the forum, you just need to "borrow" the code and wrap into the Script Task. And based on what you see you are on the right tracks.
    One thing you need to be aware of: in production such RESTfull call usually lead to a fiasco for the machine residing in some kind of DMZ or Firewall rules prohibiting these methods or you need a proxy account to run the package and you face unbeggable admins
    who resist to relaxing security.
    My suggestion is to go the easy route: write the app up as a console, standalone app - it will be easier to debug and there will be complete examples of them in abundance on the web.
    Arthur
    MyBlog
    Twitter

  • Calling an external web service from SharePoint 2010

    Hi Friends,
    Idea is to call an external web service from SharePoint 2010 list.
    Can we do this using visual studio 2010, how.
    another pointers, please advise.

    Hi,
    You can create Windows Communication Foundation (WCF) web services that you can consume as external content types from Microsoft Business Connectivity Services (BCS).
    For more information, you can refer to:
    http://msdn.microsoft.com/en-us/library/office/gg318615(v=office.14).aspx
    http://www.c-sharpcorner.com/UploadFile/Roji.Joy/connecting-to-a-web-service-using-business-connectivity-serv/
    http://blogs.msmvps.com/windsor/2011/11/04/walkthrough-creating-a-custom-asp-net-asmx-web-service-in-sharepoint-2010/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to call Jive Search methods using REST Web Services from ADF

    Hi
    Can someone provide me an example to call JIVE Search using REST web services from Webcenter ADF.
    As we have the similar facility to call UCM Search from WebServices DataControl.
    Do we have anything similar like this for JIVE Search?
    JIVE 5.1 is deprecating SOAP style web services and so I am planning to use REST.
    Any suggestions on this is much appreciated.
    Many Thanks
    Khad

    so what exactly is the problem here?
    what is not working?

  • 401 Unauthorized Error when Registering Workflow Manager

    I have installed the workflow manager successfully. However, when I try to run Register-SPWorkflowService I get a 401 Unauthorized error. I am running SharePoint 2013 Management Shell as administrator.
    When I use internet explorer to browse to https://FQDNofServer:12290 I get prompted for my password 3 times and then get the Not Authorized Error here as well. I have tried this from the local host as well as remote machines with the same result therefore,
    I don't think I need to disable loopback check.
    My user is a member of the Workflow AdminGroup as well as a local admin, farm administrator and I also added my account as an administrator for the Workflow Service Application in Central Administration. I also tried giving the workflow service account full
    read on the web application.
    I cannot find anything in the ULS logs or windows event viewer logs when the login fails. Any help would be appreciated.
    Thank You.

    Hi,
    Glad to hear that you solve this issue, thanks for your sharing.
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Getting 401 Unauthorized error when accessing Resource History in OIM11gR2

    Hi,
    I am receiving the following error (In the Resource Histroy Popup window) when I tried to access the Resource History for completing a User provisioning (DB Resource using Oracle DB connector).
    I have setup OIM 11g R2 on Windows 2008 Server Enterprise R2 with Oracle DB 11g R2
    Error 401--Unauthorized
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.2 401 Unauthorized
    The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.46) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity MAY include relevant diagnostic information. HTTP access authentication is explained in section 11.
    I have read in other forum links that we need to configure the Authorization policies from OES APM console.
    I have setup the APM console, but I am not sure how to configure this related to my scenario
    I couldn't figure out what policies to be configured for my requirement under Application---->OIM----->oimdomain----->Authorization policies in APM console.
    I request experts to help on this as I am completely stuck here.
    Thanks,
    Madhu

    Hi user9212679,
    I am able to resolve the issue by reconfiguring the Domain properly with my FQDN of my VM.
    Earlier I was using my IP Address instead of FQDN and but the OIM is taking the FQDN of the machine and throwing 401 Unauthorized error.
    But I appreciate you help as it gave me clue of what could be wrong.
    Thanks,
    Madhu

  • How to call restful web services from BPEL

    How do we call create partnerlinks for calling RESTful web services in Oracle BPEL.
    Any ideas ?

    Raymond,
    1. To consume WebService in Flex you don't need FDS at all.
    2. AFAIK, you need crossdomain.xml at WS host or System.allowDomain("ws-host") or System.allowInsecureDomain("ws-host") on Flex side. Check Flex documentation.
    3. Better to discuss this topic in some other forum -- say WebAS General. It's not related to WD
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

Maybe you are looking for

  • Videos In Youtube Not Smooth

    I recently upgraded my computer to i7 4770k, 16gb ram and 780ti, windows 7 pro 64bit etc, its pretty much almost top of line pc right now but since i moved from xp to 7, youtube in Firefox is choppy and not smooth like before, its amazing on internet

  • PHP/Oracle/Apache on Windows mid tier

    Hey, I am trying to set up PHP to connect to my oracle instance using apache. The PHP/Apache set up is on XP, which I also have a 9i client installed. I am trying to then connect to a database on a linux box. the 9i client works fine, SQL*Plus and ev

  • Skipping dependent Tables in Logical Standby

    Hello DBAs I need your expertise here. Let me explain the scenario. Suppose a table is skipped in a logical standby. This table is referred by other tables and there are dependencies on this table. Now my question is what happens when a transaction i

  • Photo Stream sharing among 1000 company phones

    I have just under 1000 phones that I need to set up to share pictures. I know the limits of Photo Stream. Are there workarounds to those limits like setting up 10 streams and having 100 subscribers to each? What other methods or apps are there? Thank

  • ECC 6.0 System messages for purchasing transaction code needed

    I am looking for the txn code for purchasing messages; I am looking to change one from Error to Warning. Thanks, Michelle