Web service using Lotus notes - web-services

when am trying to WSDL using lotus script i got following error, any one help me
"Error: client:WSDLreader:Loading of the wsdl file failed HRESULT=0x80070057-WSDLReader:xml Parser failed at linenumber 1, lineposition 63, reason is required white space was missing.HRESULT=0x1Line:7"

It sounds like an error with the WSDL file. See if you can verify it with an online WSDL checker.
Also, make sure you have specified the correct endpoint URL.

That error normally means that the structure of the WSDL is broken. For example if you got a 404 page back instead of WSDL from the server.
First try opening the WSDL File via a browser and check it to make sure you only get the WSDL back.
Your URL above has at the end:
?WSDL%22
The %22 looks wrong.
Second you can test your WSDL using a tool like SOAPUI. http://www.soapui.org
There is a tutorial on the Wiki at this location:
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Testing_your_Domino_web_service_provider_and_consumer_using_SoapUI._

Related

wsimport with special character and Xauthfile

I'm facing the same problem that this guy here:
wsimport Xauthfile error
Since he didn't gave a feedback and I'm new here and can't ask him if he solved his problem I'm opening a new question.
I'm using ubuntu and have JDK7 from java oracle installed.
I'm consuming a thirdparty web service. The password (...GT##ED...) for the webservice have a character that conflicts with de -Xauthfile syntax (http[s]://user:password#host:port//) because of the "#". The dots (...) represents the rest of my password.
Here is the command I'm running:
wsimport -p loa -Xauthfile "path_to_auth.txt" https://myWS?wsdl
In my auth.txt file I have:
https://user:...GT##ED...#myWS?wsdl
In return a get
parsing WSDL...
[ERROR] Server returned HTTP response code: 401 for URL: https://myWS?wsdl,
"https://myWS?wsdl" needs authorization, please provide authorization file with
read access at /home/user_name/.metro/auth or use -Xauthfile to give the
authorization file and on each line provide authorization information using this
format : http[s]://user:password#host:port//<url-path>
I search all over the net, but no success.
When I try to import the WS using SoapUI like in this tutorial I got a
[ERROR] sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid
certification path to requested target
and I don't know where to specify the ssl file for SoapUI. I tryed in
preferences -> SSL Settings
but no lucky.
That's it. I'll apreciate any help.
EDIT
OK, so I pass through the authorization, changing the characters using the HTML URL Encoding Reference, but now I'm getting the following error
[ERROR] Server redirected too many times (20), "https://ws?wsdl" needs
authorization, please provide authorization file with read access at /home/user
/.metro/auth or use -Xauthfile to give the authorization file and on each line
provide authorization information using this format :
http[s]://user:password#host:port//<url-path>
I am using Apache axis2 instead of wsimport. first this problem happened for me, and I write a bash script and it worked.
#!/bin/bash
/axis2-1.7.9/bin/wsdl2java.sh -uri http://username:password#domain/x?wsdl
I also use encoding password and username by 'url encoding' such as bellow:
##%g3E99! -(URL encoding)-> %40%23%25g3E99%21
First create auth.txt file where you need to put the following and save it in C drive:
http://username:password#localhost:port/wsdlurl
Now run the following command:
wsimport -Xauthfile C:\auth.txt -keep http://example.com/test?wsdl
This worked for me.

Unsupported Media Type error in SoapUI

I checked all of the this kind of problems in stackoverflow that you met. But I couldn't match with mine.
So, i wanna test my webservice with SoapUI.
In my wsdl link there is no type definiton for inputs (it says just
string. it wants loginName, userName and password).
And also I have real inputs to check it, but on the right side of my
Request window there is always this sentence: "The server cannot
service the request because the media type is unsupported." in every
test.
I checked my Raw tabs, my content-types are text/xml;charset=UTF-8
and I think it should be like this too.
And also during the test, it is using the first SOAP.
This problem can be about what? My web browser? My client? My internet settings? What should i do?
Note: I tried trial webservices that i found from the webservicex.net, i could test them without error...

HTTP 404 error while invoking a local webservice in .NET MVC4

I am trying to learn webservices in .NET mvc4. I tried creating a new Internet application and adding a Web service (asmx) to the project.
By default, the VS adds a "HelloWorld" Webservice. When I try to run it in the browser, I do get the list of operations, service description(WSDL) and the details of the HellowWorld operation. However, when I try invoking the webservice, it gives the following error :
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make
sure that it is spelled correctly.
I might be missing some basic step/setting I guess. Could some body help please. Thanks.
I got the answer from one of my colleagues :) .
When we invoke the service, the MVC tries to resolve the path as specified in RegisterRoutes.
Hence it tries to find a controller with that name and a method with the name same as that of the operation inside that controller. The resolution, ignore the paths with .asmx extension. You can do that by adding the following line in RouteConfig.cs :
routes.IgnoreRoute("{*x}", new { x = #".*\.asmx(/.*)?" });
and it worked. Thanks.

Web service Response got a schema validation error

I'm using glassfish for my development.
When I hit a web service by sending a SOAP request through SoapUI in our UAT box. I got the following schema validation error message.
Invalid QName value: Can't resolve prefix 'ns0'
The response looks like following for the line causing the error.
<faultcode>ns0:SC_018</faultcode>
But in my local box. I don't get the validation error. Because the line causing problem above looks like
<faultcode xmlns:ns0="http://****.com">ns0:SC_018</faultcode>
I'm thinking there should be some JVM options set up are different that may cause this error ?
There is a namespace prefix ns0 (in your XML request/response) that is not defined.
Because you say the line appears at one machine with the proper namespace definition (xmlns:ns0="http://****.com") and not at the other, this can be a problem at the service provider.
ns0:SC_018 looks like a custom fault code that sometimes is built right (with namespace and no error given) and sometimes isn't (no namespace and error appears).
You say this appears in one machine and not at other, is it the same client? SoapUI is a Java program, so it must behave almost exactly at different environments. Also, this is such a specific issue that seems very unlikely this is a JVM configuration problem.
In order to resolve this issue, you have update the schema, once schema is updated successfully, then try to update the definition. It would be fixed.

Spring WS show WSDL definition at specyfic address

I have problem with displaying my WSDL. I have found a way to dynamic read it from my XSD schema and now i am doing this as:
<sws:dynamic-wsdl id="test"
portTypeName="testPort"
locationUri="/"
targetNamespace="http://testnamespace">
<sws:xsd location="/WEB-INF/test.xsd"/>
</sws:dynamic-wsdl>
this way i got under address : localhost:localport/applicationname/id.wsdl WSDL which in my case is : localhost:8080/MyApp/test.wsdl.
Thing i want to achive is to display this WSDL after executing another request: localhost:8080/MyApp/test.aspx?WSDL How can i edit my code to do so? Can anyone redirect me somewhere if it is described ? I thought about creating a wsdl file instead of xsd but do anyone have an example how to show under specyfic address wsdl file?
From mine experience I recommend You modify your proxy_ajp configuration file add:
ProxyPass /MyApp/test.aspx?WSDL ajp://localhost:8080/MyApp/test.wsdl
then restart your httpd. After this operation all request coming for localhost:8080/MyApp/test.aspx?WSDL will giving the localhost:8080/MyApp/test.wsdl result