401 Error on Consuming SharePoint Versions Web Service by java client running on Unix Machine
In my organiszation I have sharepoint site of our project. I have a java client to consume Versions Web Service offered by SharePoint. The response received from web service without any issue when triggered from a client running on windows machine on
intranet.
When same java client ran from UNIX server on same intranet, it gives 401 error. Is there some different approach required for authentication while connecting from unix machine?
Thanks in advance.
Hello,
Are you passing credential in code? If not then try to add using networkcredential.
If you are passing then make sure that current user is having access on SP site and your javaserver is setup for NTLM security. Here is few links for same issue which could help you troubleshoot the issue
http://stackoverflow.com/questions/8884152/ntlm-fails-when-consuming-sharepoint-web-service-from-java
http://www.pentalogic.net/sharepoint-products/reminder/reminder-manual?p=troubleshooting%2F401errors%2F401errors.htm
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see<br/> Please remember to mark the replies as answers if they help and unmark them if they provide no help
Similar Messages
-
How to consume the Abap web service in Java web-dynpro
Hi Everyone,
I want to consume ABAP web service in java web dynpro.
so when i tried to create model in java web-dynpro, it gave me an error message saying "Invalid WSDL or WSDL not found".
i think this error message is because, to access the WSDL of abap web-service, we need username and password, but the dialog box in java web-dynpro is not programmed to take username and password from us and send it to the server to get the WSDL.
i came to this conclusion because i was able to successfully test my abap web-service in java portal. the java portal asked me the username and password to open the WSDL.
So, please help me to consume the abap web service in java web-dynpro.
Thanks in advance
Regards
VikasHi Vikas ,
while creating a model in web-dynpro try to use the "import web service model" option and if you are using local server choose the local server option so that you can get the available web services which are in server, select one among them and continue you process.I think this is the some what easy way .
If you want use the URL for wsdl better to once test the available service in server and copy that WSDL URL and paste over WSDL textbox.
I think this is pretty help ful to you
Best Regards
Srikatnh -
401:Unauthorized error while consuming a MOSS web service
Hi, We are trying to cosume a Web Service from MOSS using Spring and Axis. The WSDL requires user name and password. We are passing the right credentials however we are getting the 401 error. The exact exception is provided below. Could any one advise how this can be resolved?
java.io.FileNotFoundException: Response: '401: Unauthorized' for url: 'https://ts2amr.accenture.com/_vti_bin/Search.asmx?wsdl'.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spWSClient' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'spWebService' while setting bean property 'service'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spWebService' defined in ServletContext resource [WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.remoting.RemoteLookupFailureException: Failed to initialize service for JAX-RPC port [{urn:Microsoft.Search}QueryServiceSoap]; nested exception is javax.xml.rpc.ServiceException: Error processing WSDL document:
java.io.FileNotFoundException: Response: '401: Unauthorized' for url: 'https://ts2amr.accenture.com/_vti_bin/Search.asmx?wsdl'I can't speak for MOSS for sure, but other Microsoft services such as MapPoint used to require Digest Authentication, which isn't quite as pervasive as Basic Authentication. You should doublecheck with the MOSS administrator about the proper credentials and access. You might even try a utility like SoapUI to see if things work from a test client before trying it on the application server.
-
Error invoking Web Service from Java client
Hi
I have created an ALSB Proxy service and exposed it as a web service. I have created a Java Client the code for which is pasted below:
String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
String url = "http://localhost:7001/Dummy_ALSB_Project/proxy/Dummy_Proxy_Service?WSDL";
String TARGET_NAMESPACE = "http://www.bea.com/servers/wls810/samples/examples/webservices/handler/log";
QName xsdString = new QName("http://www.w3.org/2001/XMLSchema", "string");
ServiceFactory factory = ServiceFactory.newInstance();
QName serviceName = new QName(TARGET_NAMESPACE, "LogHandler");
QName portName = new QName(TARGET_NAMESPACE, "ProcessSoap");
QName operationName = new QName("writeCustNameToFile");
Service service = factory.createService(serviceName);
Call call = service.createCall();
call.setPortTypeName(portName);
call.setOperationName(operationName);
call.addParameter("param0", xsdString, ParameterMode.IN);
call.setProperty(ENCODING_STYLE_PROPERTY,URI_ENCODING);
call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY,"");
//set end point address
call.setTargetEndpointAddress(url);
call.invoke(new Object[]{ "The Joshua Tree" });
When I run the service, I get the following error:
java.rmi.RemoteException: BEA-380001: Internal Server Error
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:524)
at TC.methodB(TC.java:67)
at TC.main(TC.java:9)
Any clues about what is going wrong?? Thanks in advance.It's recommended to use the same verison of client and service.
-
Consuming 3rd party web service in Java web dynpro application
Hi All,
I am working on a scenario where external(3rd party) web service has to be consumed in WD Java application. I am provided with WSDL file. Let me explain how I usually consume other webservices:
Create model->AWS model->Remote Location/file System->provide url->create/choose service group->finish
Then I would generate the code in custom controller by applying template
I assign provider system as local for the service group in nwa.
This is normal process to me. I am struck with this 3rd party web service. Please share your ideas on the same. Any help is highly appreciated.
BR,
ManojI ve created a provider system pointing to where 3rd party WS resides. i am trying to connect through WSIL. While pinging that provider system, I don't see that particular WS(that I am gonna consume). And while assigning this Provider system to service group, processing state getting 'Failed'.
What could be reason? -
Calling .asmx Web Service from Java Client
hi
I have created one java client in WSAD 5.1 to invoke .asmx web service. I have used the following code for it.
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.namespace.QName;
import javax.xml.rpc.NamespaceConstants;
import javax.xml.rpc.ParameterMode;
import java.net.URL;
public class JavaWS3
public static void main(String [] args)
try
// Responds the same with or without the ?WSDL
String strEndPoint = "http://www.meizlik.com/Service.asmx";
String strSoapAction = "http://www.meizlik.com/BigAdd";
String strSchemaURL = "http://www.w3.org/2001/XMLSchema";
String strParamName1 = "addend_1";
String strParamName2 = "addend_2";
String strParameterVal1= "10";
String strParameterVal2= "7";
String strFunctionName = "BigAdd";
//Call call = (Call) new Service().createCall();//Works
//Call call = new Call(strSoapAction);//Works same
//Call call = new Call(strEndPoint);//Works same
Service service = new Service();
Call call= (Call) service.createCall();
call.setEncodingStyle(NamespaceConstants.NSURI_SOAP_ENCODING);
call.setTargetEndpointAddress(new URL(strEndPoint));
// first parameter in QName seemingly takes ANYTHING
call.setOperationName(new QName("http://www.meizlik.com", strFunctionName));
// Set the name of the parameter and the return type
call.setReturnType(XMLType.XSD_STRING);
call.addParameter(new QName("http://www.meizlik.com",strParamName1), XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter(new QName("http://www.meizlik.com",strParamName2), XMLType.XSD_STRING, ParameterMode.IN);
// Catch the result and print it
// Parameter count is now ONE (1).
// call.setUseSOAPAction(true);//Not Necessary
call.setSOAPActionURI(strSoapAction);//Yes Necessary
String strResult = (String) call.invoke(
new Object[] {
new String(strParameterVal1),
new String(strParameterVal2)
System.out.println("Result='" + strResult + "'");
catch (Exception e)
e.printStackTrace();
System.out.println(e.toString());
}this code is giving me the exception as :
java.net.ConnectException: Operation timed out: connect due to invalid addressI visited web service URL http://www.meizlik.com/Service.asmx and its working fine.
I also tried Java Proxy method in WSAD 5.1 but it is showing me the same error.
Where am I wrong? Can anyone plz give me solution 4 this.
Thanks..Hi,
I have even generated folowing code with SoaMoa, it is perfect. Please try SoaMoa it is a useful tool.
The generated code of SoaMoa :
/* Generated Testcase by SoaMoa, :ridvan at Thu Jun 04 21:53:14 CEST 2009 */
import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.ws.Dispatch;
import javax.xml.ws.Service;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.soap.SOAPBinding;
import java.util.Iterator;
import junit.framework.TestCase;
public class BigAddTest extends TestCase {
public void testBigAdd() throws Exception {
String endpointURL = "http://www.meizlik.com/Service.asmx";
QName serviceName = new QName("http://www.meizlik.com", "Bob_Services");
QName portName = new QName("http://www.meizlik.com", "Bob_ServicesHttpPost");
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointURL);
Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE);
BindingProvider bindingProvider = (BindingProvider) dispatch;
// Optionally Configure RequestContext to send SOAPAction HTTP
Map<String, Object> rc = bindingProvider.getRequestContext();
rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
rc.put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://www.meizlik.com/BigAdd");
MessageFactory messagefactory = MessageFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL);
SOAPMessage request = messagefactory.createMessage();
SOAPPart part = request.getSOAPPart();
SOAPEnvelope env = part.getEnvelope();
SOAPBody body = env.getBody();
body.addNamespaceDeclaration("www", "http://www.meizlik.com");
SOAPElement BigAdd = body.addChildElement("BigAdd", "www");
SOAPElement addend_1 = BigAdd.addChildElement("addend_1", "www");
addend_1.addTextNode("11");
SOAPElement addend_2 = BigAdd.addChildElement("addend_2", "www");
addend_2.addTextNode("11");
request.saveChanges();
SOAPMessage response = dispatch.invoke(request);
SOAPBody replyBody = response.getSOAPBody();
SOAPElement BigAddResponse = (SOAPElement) replyBody.getChildElements(new QName("http://www.meizlik.com", "BigAddResponse")).next();
assertNotNull( "BigAddResponse is null", BigAddResponse);
SOAPElement BigAddResult = (SOAPElement) BigAddResponse.getChildElements(new QName("http://www.meizlik.com", "BigAddResult")).next();
assertNotNull( "BigAddResult is null", BigAddResult);
assertEquals("BigAddResult", "0000000000000000000000000022", BigAddResult.getTextContent());
} -
Failure to create Web Service using Java client
Attempting to create a WebService using a Java client (partial code follows):
String xml = "<custId xmlns=\"http://samples.otn.com\">" + 101 + "</name>";
//Context ic = new InitialContext();
Locator lctr = new Locator("default", "bpel");
IDeliveryService dservice = (IDeliveryService)lctr.lookupService(IDeliveryService.SERVICE_NAME);
NormalizedMessage nm = new NormalizedMessage();
nm.addPart("payload", xml);
However - get the following error message:
E:\OraBPELPM_1\jdk\bin\javaw.exe -client -classpath E:\OraBPELPM_1\integration\jdev\jdev\mywork\Workspace1\BPELProcess1\output;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-common.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-thirdparty.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-infra.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-services.jar -Dhttp.proxyHost=ges-proxy.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=jpa*.jp.oracle.com|jpe*.jp.oracle.com|*.oracle.co.jp|144.23.230.118|144.23.230.110|psh*.peoplesoft.com|*.us.oracle.com|ex*.oracle.com|es0*.oracle.com|localhost|127.0.0.1 BusinessProcess.TestBPEL
java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
at com.oracle.bpel.client.Locator.<init>(Locator.java:65)
at BusinessProcess.TestBPEL.main(TestBPEL.java:19)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)
at com.oracle.bpel.client.Locator.<init>(Locator.java:65)
at BusinessProcess.TestBPEL.main(TestBPEL.java:19)
Exception in thread "main" Process exited with exit code 1.
The line: Locator lctr = new Locator("default", "bpel");
is the point of the error -
What is the problem here. I have seen several similar issues on the forum but I have not foound one that iindicated a solution to the problem.
THANKS - Ken CooperApplied the suggested code and am getting following errors:
E:\OraBPELPM_1\jdk\bin\javaw.exe -client -classpath E:\OraBPELPM_1\integration\jdev\jdev\mywork\Workspace1\BPELProcess1\output;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-common.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\orabpel-thirdparty.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-infra.jar;E:\OraBPELPM_1\integration\jdev\jdev\lib\ext\bpm-services.jar -Dhttp.proxyHost=ges-proxy.oracle.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=jpa*.jp.oracle.com|jpe*.jp.oracle.com|*.oracle.co.jp|144.23.230.118|144.23.230.110|psh*.peoplesoft.com|*.us.oracle.com|ex*.oracle.com|es0*.oracle.com|localhost|127.0.0.1 BusinessProcess.TestBPEL
java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NoInitialContextException: Cannot instantiate class: com.evermind.server.rmi.RMIInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.evermind.server.rmi.RMIInitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:216)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.Locator.<init>(Locator.java:126)
at com.oracle.bpel.client.Locator.<init>(Locator.java:97)
at BusinessProcess.TestBPEL.main(TestBPEL.java:30)
Caused by: java.lang.ClassNotFoundException: com.evermind.server.rmi.RMIInitialContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
... 8 more
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.Locator.<init>(Locator.java:126)
at com.oracle.bpel.client.Locator.<init>(Locator.java:97)
at BusinessProcess.TestBPEL.main(TestBPEL.java:30)
Error occurs at the bold line below - same location as before:
Properties props = new Properties();
props.setProperty("orabpel.platform", "oc4j_10g");
props.setProperty("java.naming.factory.initial",
"com.evermind.server.rmi.RMIInitialContextFactory");
props.setProperty("java.naming.provider.url", "ormi://localhost/orabpel");
props.setProperty("java.naming.security.principal", "admin");
props.setProperty("java.naming.security.credentials", "welcome");
props.setProperty("dedicated.rmicontext", "true");
Locator lctr = new Locator("default", "oracle", props);
Thanks - Ken -
Can PJC ORACLE9IAS FORMS Services - FILEUPLOAD Java Bean run on UNIX?
I got the File Upload Utility sample code from //otn.oracle.com/sample_code/products/forms/content.html
The File Upload demo consists of the following files:-
1. fileuploader90.fmb
2. fileupload90.pll
3. FileUploader.java, FileUploaderProgrressBar.java ==> By using Oracle 9i JDeveloper(version 9.0.2.822 and java version 1.3.1), I had compiled and deployed and jarred java classes for the client side bean. Finally, I get uploadclient.jar.
4. FormsDecoder.java, FormsDecoderException.java ==> By using Oracle 9i JDeveloper(version 9.0.2.822 and java version 1.3.1), I had compiled and deployed and jarred java classes for the server side bean. Finally, I get uploadserver.jar.
And I had done accordingly to the steps.
I had added an entry in the formsweb.cfg file to call the FileUpload demo as following:-
[FileUpload]
pageTitle=Oracle9iAS Forms Services - FileUpload Demo
archive_jini=f90all.jar,uploadclient.jar
archive_ie=f90all.jar,uploadclient.jar
archive=f90all.jar,uploadclient.jar
form=fileuploader90.fmx
width=675
height=480
separateFrame=false
splashScreen=no
lookAndFeel=oracle
colorScheme=blue
background=/forms90demo_images/blue.gif
logo=/forms90demo_images/Forms9i.gif
envFile=fileupload.env
And this environment file, fileupload.env, code is as following:-
#fileupload.env
#Environment file used to setup the FileUpload Demo
ORACLE_HOME=/export/home2/9ids/OraHome1
PATH=/export/home2/9ids/OraHome1/bin/classic:/export/home2/9ids/OraHome1/bin
CLASSPATH=/export/home2/9ids/OraHome1/forms90/java/uploadserver.jar:/export/home2/9ids/OraHome1/jdk/jre/lib/rt.jar
FORMS90_PATH=/export/home2/9ids/OraHome1/forms90/demos/lib:/export/home2/9ids/OraHome1/forms90/demos/fileupload/forms
Then by using Oracle Forms 9.0(version 9.0.2.7.0) attach the FileUpload.pll library and compiled and run the forms.Click on the select button.and NO REPLY.NO ERROR NUMBER.No Progress Bar. Nothing...
Then I exit the form and add the config=FileUpload& into the web browser. Then I get the forms. Click on the select button and also NO RESPOND,NO ERROR,No Progress Bar. The File Upload Utility is not working.
Can anyone help me on this issue? Urgent...
Thank you so much.
Best Regards,
WongHello Duncan,
Are you one of the authors for the File Upload Utility? I am very happy to talk with you. How can we solve this BIG BUG 2550330? And make it run on UNIX platforms.
Best Regards,
Wong -
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 insightHi,
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 -
We are using .asmx services for SharePoint features such as comments, and rating.
Service
Feature used
http://<<hostname>>/_vti_bin/socialdataservice.asmx
Commenting, Rating
http://<<hostname>>/_vti_bin/UserProfileService.asmx
For out of box workflows
In SharePoint 2013,
SharePoint – 80 web application is on claims based mode and user is logging in with windows authentication. With logged-in client context used to call SharePoint's default web service, we are getting below error message from
web service (Social data and user profile services).
Server was unable to process request. ---> The corresponding SID in the domain is not part of the intended account type.
When the service is accessed using console application with Visual Studio credentials (logged in user), we are able to access the service. Below is the code snippet
using (SocialDataService
service = new
SocialDataService())
service.Credentials =
CredentialCache.DefaultCredentials;
SocialCommentDetail detail = service.AddComment("<<url>>",
"Test Comment",
null,
null);
Are SharePoint 2013 web services not supporting request coming with claim based authentication web application?
Thanks, Pratik Agrawal (MAQ Software)While this applies to 2010, I believe the same is true with 2013:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/925e5f46-317f-46d3-bc55-c67f07eb2372/call-sharepoint-web-services-using-claimbased-authentication?forum=sharepointgeneralprevious
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Consuming an External Web Service using HTTPS and WS Security
Hello everyone,
I'm having a problem setting the security information in a SOAP header using a generated ABAP Client Proxy to consume an external web service that requires a User ID and Password in the Header section of the SOAP message. I need to use HTTPS. I'm on a WAS 7.01 SP08 system so from my readings, SAP is supposed to be able to add the username and password into the header section of the message. I can't seem to get SAP to add this information added to the header.
Here are the steps that I have taken to set the security values.
1) Created the client proxy from the WSDL in SE80. Basic Authentication on the Configuration tab was turned on automatically.
Note, Transport Security is set to None. I cannot change it.
2) Created an outbound set user name profile in transaction WSPROFILE with the appropriate username and password.
3) Added the profile to the default port in transaction LPCONFIG as an outbound under the WS Security section of the screen.
When I called the external Web Service, I got back the following error message:
com.ibm.wsspi.wssecurity.SoapSecurityException: WSEC5509E: A security token whose type is [http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken] is required.
So, after reading through this Forum, I saw that I needed to use the SOAMANAGER. I set up a Proxy in the SOAMANAGER and manually created the Logical Port. This was the only way I could figure out how to set the Authentication Settings in the Logical Port to "User ID / Password". I then entered the User ID and Password.
However, I am still getting the same error message. I feel I am close but missing some small configuration to tell SAP to use WS Security with a Username token.
I'm not sure what I'm doing wrong, so any help would be appreciated.
Thanks,
StephenI had this error again so I thought I would post my solution:
The issue is SAP needs to know the certificates being used by the web site being called. These certificates are automatically installed in your browser but need to be manually installed in SAP. This is what I did:
How to find/install new certificates
Make sure you run Internet Explorer as an Administrator so you can export the certificates
Go to the web site that SAP is trying to call in Internet Explorer
Double click on the lock in the address bar
View certificates
Find the certificates that are being used
Tools --> Internet Options --> Content --> Certificates
Click on the “Trusted Root Certification Authorities” tab
Find the certificate identified in step iii
Export as a CER certificate
Click on the “Intermediate Certification Authorities” tab
Find the certificate identified in step iii
Export as a CER certificate
Go to STRUST in SAP
Import the Certificates in the “Anonymous” or “Standard” SSL client
Save
RESTART the ICM via t-code SMICM <-- Critical!!!
Test -
Error while trying to publish a web service in UDDI client
hi
i m getting this error when trying to publish my web service in UDDI client.I have
configured my uddi client using Visual Administrator.I created a local test registry.The name of my registry is QuickCarRentalRegistry_Local.I created this at admin level.I also tried at level 1 Tier.But it was giving the same error.
The error is "<b> Internet Explorer Script Error</b>".my ie version is 7.0
In my alert window it displays error: 'ur_txt' is undefined.
Regards
mythri.Hi mythri.
Did you find a way out of this error? Could you share the solution with me? Because I am facing a problem that looks just like the one you had.
Thanks in advance.
Renan -
Help: consuming an external web service with user name token
Hello Together!
I need to consume an external web service secured with WS-UserNameToken. The way, how did I do it:
1. I generated a web service consumer (proxy) in SE80 from the wsdl file
2. I created logical port for the consumer in SOAMANAGER
3. I created security profile in WSSPROFILE with telpmate SET_USERNAME and assigned it to consumer operation in LPCONFIG (I use LPCONFIG, because I didn't find any way to do it in SOAMANAGER)
3. I called the web service and got the error back: session token is missing or invalid or has inspired
My questions are:
1. is this possible to consume an external webservice in SAP, which is secured with WS-Usernametoken?
2. do I need therefore any settings in java stack? do I need java stack in general?
3. Is this any way to configure the consumer without writing programs, which set header parameter manually?
4. if the answer on the third question is no, do you have any examples, how to implement session management in report? (I mean sending session id and checking the validaty of id)
I appriciate any help of you!
best regards AnnaHi,
it should be possible to use WS-UserNameToken for consuming web service. It should be available on AS BAP 7.0 and higher. This profile should be under category Document authentication. You can try to dump a message send from SAP to see what is going out of SAP. This should be supported in ABAP so you don't need a Java stack. What exactly do you want to configure? Do you want to just set user name and password for that service which will be used for any calls of that proxy?
Cheers -
How to retrieve error message(s) after failed web service call
Hi!
I tried to create an item using the web service ego_item_pub.process_item and it worked ok (version 12.1.1). Sending the same request again, I got an error which should be ok since the item id already exists. The thing is, that I only get an "E" as return status:
<X_RETURN_STATUS>E</X_RETURN_STATUS>
<X_MSG_COUNT>1</X_MSG_COUNT>
As described in the integration repository, there should be a parameter called msg_data which should contain the message if there is exactly 1 message, but I cannot find it.
So, I tried to get the message using fnd_message.get, but the response of my web service call is:
AuthorizationFailure : User not authorized to execute service. (I use sysadmin/sysadmin as ws security user).
I use the following grant details:
All Users Direct GLOBAL Revoke Action Enabled
SYSADMIN SYSADMIN Direct USER
What else can I do or how can I retrieve error messages for a failed web service call?
Thanks a lot,
KonradHi Konrad,
As we've found out, search the Integration Repository for internal name ERROR_HANDLER and use that. Letting the general public know the answer for this one!
Regards,
Gareth
http://garethroberts.blogspot.com -
Consuming ES Workplace Web Services in CAF - ReadCustomer Example
Hi,
I am trying out the steps from [Consuming ES Workplace Web Services in CAF|http://help.sap.com/saphelp_nw72/helpdata/en/6d/00932cf834471789ad286986185acb/content.htm]
Completed steps 1 through 5 successfully. For step 6 I am unable to locate the options and I guess I missed something here.
When I am testing the development I get the error Service Mapping is missing.
More Error info: com.sap.caf.rt.connectivity.exception.CAFWSExecException: The Service mapping is missing.
Please let me know if I am missing something here or the configuration I might be missing in step 6.
Environment:
SDN_Preview_SR_5_CE71.rar
SDN_Preview_SR_5_IDECE71.rar
Thanks,solved.
Maybe you are looking for
-
Purchase info record as SOS in template Shopping cart
Hi, We are on SRM 4.0, support pack 4. At present purchase info record created in the backend is not taken as source of supply in SRM for Template shopping carts.We have a requirement for this functionality. Has anybody done this development in their
-
Hi all, Being a bit newer at all this I'm sure there is something I don't know that I don't know which would answer this: Been taking some identical test shots on my new 6D and my old 60D to compare. Jpeg only for now, same "quality" setting. I
-
hello. i am trying to perform a long-overdue system clean-maintenance on my macbook running osx 7.5 and i can't boot to safe mode using the shift key. i am sure that i have tried every possible permutation of holding down the key during startup. i se
-
Trying to transfer iphone 4 to 5
Trying to transfer iphone 4 to 5 using itunes but its telling me I am dont have the latest itunes version. I have run the update and my macbook is telling me I am up to date. Any suggestions on how to fix?? PLease dont tell me I need a new mac!!
-
Failure to install on snow leopard, mountain lion
I have a 2.5 GHz Intel Core 2 Duo with 4 GB SDRAM. On certain U-tube and other videos, but not all, I get a message that says I need to install the new Flash player. When I go to the link provided, or directly to the Adobe web site, and install the F