Soap UI to Exchange - web-services

I am trying to connect SOAP UI to our Exchange server but i keep getting an error in SOAP UI of
Error loading [https://<<our exchange server>>/ews/Services.wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected element: STRING
I am using this as our endpoint which i have been reading that it is this and not the WSDL URL.
https://<<Our Exchange Server>>/ems/exchange.asmx
Anyone know what might be going on here?

Not sure if this is a typo in your code or just your comment, but the EWSUrl should be https://mail.contoso.com/EWS/Exchange.asmx, not /ems/.

Related

org.apache.cxf.interceptor.Fault: Unexpected element / WebSphere-Liberty Migration from WebSphere-7

The code that is working in WebSphere-7 is giving the following error in WebSphere Liberty:
javax.xml.ws.soap.SOAPFaultException: Unexpected element {http://example.com/service/Quoting/v2}SubmitRateScenarioResponse found.
Expected {http://example.com/esb/header/v3}ESBHeader.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
Caused by:
org.apache.cxf.interceptor.Fault: Unexpected element {http://example.com/service/Quoting/v2}SubmitRateScenarioResponse found.
Expected {http://example.com/esb/header/v3}ESBHeader.
at org.apache.cxf.interceptor.DocLiteralInInterceptor.validatePart(DocLiteralInInterceptor.java:275)
Any help is appreciated.
So, the problem seems to be that the SOAP Message received by the Service contains unexpected content. The client is building a SOAP Message that is violating the contract between the Service and Client. Sorry, I can't give you a better answer without more information.
Understanding what the Service is expecting compared to what the client is sending is key, and finding that would be possible with some more work. To start, I would compare what the Soap Message looks like when sent by the client on v7 to what the client is sending on Liberty by using a tool like tcpmon or fiddler to capture the message.
Were both the client and service migrated to Liberty from WebSphere V7? If you migrated the Service, was it migrated as a binary or rebuilt from a WSDL? If it was rebuilt, comparing the original WSDL from v7 to the rebuilt WSDL might tell you something about how the Service's expectations have changed.
Go through below url . may be you will find your solution
i was getting same error when i tried to hit rest api using postman client .
http://camel.465427.n5.nabble.com/i-am-getting-exception-org-apache-cxf-interceptor-Fault-org-apache-camel-CamelContext-td5742012.html#a5742016
Root cause is - camel-core jar is missed . put jar file on server->lib or apache/lib

org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error

I have installed SOAP UI 5.3 in my university system. While loading web services to a new project the following error is appearing:
org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error
I have done all possible solutions given on the Internet.
I was getting two errors:
org.apache.xmlbeans.XmlException:org.apache.xmlbeans.XmlException: error: does not close tag.
I resolved it by soapUI: Error does not close tag.
But I am unable to resolve below one.
https://community.smartbear.com/t5/SoapUI-NG/Resolved-error-does-not-close-tag/td-p/29309, set none in proxy setting in my system.
The error descriptions are misleading. Please suggest if anyone can help me.
I have tried with the following web services:
https://www.w3schools.com/xml/tempconvert.asmx?op=CelsiusToFahrenheit and used other web services as well, but I am unable to load in the SOAPUI project.
In my case, this problem solution was really simple, you just need to add ?wsdl in web service url.
http://localhost/service?wsdl
Seems like Error was misleading

"Error getting session" in websphere but working fine in jboss

I am calling a RestfulWebservice present in Websphere server from a javascript or browser by adding Authorization in the request header but getting "Error getting session". After digging into the code I found that Authorization header values are getting extracted from the header and it is showing error while connecting to a URL. This URL contains a call to another Rest webservice in the same server and is confirmed to be correct. The app is working only when it is already logged in that server from another tab and calling the webservice.
Now, this app is working as expected when a Jboss server is used.
My question is - Is there any settings in the websphere server which can resolve this issue?
The issue is resolved. I have an AuthenticationFilter to call first and I was passing wrong parameter in the request header. After passing correct parameter in the request header which is verified by AuthenticationFilter, I am getting expected result. Thanks.

PeopleSoft - Cannot process SOAP fault messages after consuming web service

PT 8.50.15
We have a new integration with a third party system. They have provided the wsdl and I have used the consume web service wizard to consume it into PeopleSoft. All this does is give you the stub messages with a schema attached to each. I have written some peoplecode to send a test message out to the webservice. When the webservice returns a valid result, I have no problems. However, when the webservice returns a fault message, I get the following error:
Integration Gateway - HttpTargetConnector:ExternalApplicationException. Http status code HttpStatusCode returned : 500. (158,10623)
HttpTargetConnector:ExternalApplicationException. External System responded with an Error status. For Http Status Code explanation please check Http protocol Specifications.
I know the webservice is returning the fault message b/c I have tried the same thing in SOAPUI. Does anyone know why PeopleSoft throws up this error ONLY on the fault message?
In addition to the prior response, the 500 error you are seeing should be followed by any soap fault coming back with the response in the errorLog.html file on your gateway (or msgLog depending on the ig.log.level setting in your integrationgateway.properties file. Check the 'response' section, as well as the stack trace for additional information.
On the routing that you are using, click the 'User Exception' check box. Then you will not get the HTTP 500 error. Evaluate the response from the response message. If it's not zero, you will then be able to parse the SOAP fault and see what the returned faultstring is.
Get your Service operation corrected. I Had same issue, After i changed the SO in this code it started working
&msgRequest = CreateMessage(Operation.Operation_name, %IntBroker_Request);

Web Service Error

I have a xml web service and I published it on IIS(localhost). Web service is veriy simple. There is only one method. And there is no exception potential in the web service. I have to use HttpWebRequest instead of adding web reference. I got the following error:
"The remote server returned an error: (500) Internal Server Error". I have checked request xml many times. When I add web referance there is no problem. What's reason of error?
Thanks in advance
Its not possible to tell what the problem is from the information you have provided.
If the web service is one that you have written then you need to get IIS to report a detailed error message on the nature of the problem (by default a restricted error message is shown to prevent would-be attackers obtaining potentially sensitive information), or find another way to obtain detailed error information. Exact instructions on how to do this will depend on the service itself (is this an ASP.Net web service? What version of IIS is this?) however this article - How to Use HTTP Detailed Errors in IIS 7.0 may be of assistance.
If the web service is one that a 3rd party has produced then I'm afraid you need to work with that 3rd party to fix this.
Update: Also try reading Detailed 500 error message, ASP + IIS 7.5 on how to get more detailed error messages.