CXF - Wsdl2Java enable to access to xml.xsd - eclipse

I am trying to set up a SOAP Web Service with Eclipse and CXF, using the contract first approach. I already generated the wsdl file and it is correct. When I am using the CXF Wsdl2Java to generate the SOAP Web Service, I got the following error:
org.xml.sax.SAXParseException; schema_reference:
Failed to read schema document 'xml.xsd', because 'file' access is not allowed
due to restriction set by the accessExternalSchema property.
Any help? Thank you so much in advance.

Ok, guys. I found the solution.
If it does not exist, create a file named jaxp.properties under %JRE_HOME%/lib and then write the following line in it:
javax.xml.accessExternalSchema = all

Related

SpringBoot RestController returns 405 for path 'services/*'

We recently updated a project to spring boot version '1.5.6.RELEASE' and noticed that several REST-services did not work anymore. We found out that it has to do with the RequestMapping - when a Rest-URL starts with 'services/', the Request always returns a HTTP 405 (Method not allowd). Changing that path a bit, it works again. Our API uses this 'services/...' paths. This only seems to occur when I also use soap services.
Has anyone a hint to solve this?
Here is a simple working example:
https://github.com/gemdat/rest_demo/tree/master
We finally found the problem - due to a spring servlet refactoring we had to adjust the 'webservice path' in the application.properties...
spring.data.rest.base-path=/services/rest
spring.webservices.path=/services/soap

IBM Integration Bus: The PIF data could not be found for the specified application

I'm using IBM Integration Bus v10 (previously called IBM Message Broker) to expose COBOL routines as SOAP Web Services.
COBOL routines are integrated into IIB through MQ queues.
We have imported some COBOL copybooks as DFDL schemas in IIB, and the mapping between SOAP messages and DFDL messages is working fine.
However, when the message reaches a node where a serialization of the message tree has to take place (for example, a FileOutput or a MQ request), it fails with the following error:
"The PIF data could not be found for the specified application"
This is the last part of the stack trace of the exception:
RecoverableException
File:CHARACTER:F:\build\slot1\S000_P\src\DataFlowEngine\TemplateNodes\ImbOutputTemplateNode.cpp
Line:INTEGER:303
Function:CHARACTER:ImbOutputTemplateNode::processMessageAssemblyToFailure
Type:CHARACTER:ComIbmFileOutputNode
Name:CHARACTER:MyCustomFlow#FCMComposite_1_5
Label:CHARACTER:MyCustomFlow.File Output
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Caught exception and rethrowing
Insert
Type:INTEGER:14
Text:CHARACTER:Kcilmw20Flow.File Output
ParserException
File:CHARACTER:F:\build\slot1\S000_P\src\MTI\MTIforBroker\DfdlParser\ImbDFDLWriter.cpp
Line:INTEGER:315
Function:CHARACTER:ImbDFDLWriter::getDFDLSerializer
Type:CHARACTER:ComIbmSOAPInputNode
Name:CHARACTER:MyCustomFlow#FCMComposite_1_7
Label:CHARACTER:MyCustomFlow.SOAP Input
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:5828
Text:CHARACTER:The PIF data could not be found for the specified application
Insert
Type:INTEGER:5
Text:CHARACTER:MyCustomProject
It seems like something is missing in my deployable BAR file. It's important to say that my application has the message flow and it depends on a shared library that has all the .xsd files (DFDLs).
I suppose that the schemas are OK, as I've generated them using the Toolkit wizard, and the message parsing works well. The problem is only with serialization.
Does anybody know what may be missing here?
OutputRoot.Properties.MessageType must contain the name of the message in the DFDL schema. Additionally when the DFDL schema is in a shared library, OutputRoot.Properties.MessageSet must contain the name of the library.
Sounds as if OutputRoot.Properties is not pointing at the shared library. I cannot remember which subfield does that job - it is either OutputRoot.Properties.MessageType or OutputRoot.Properties.MessageSet.
You can easily check - just check the contents of InputRoot.Properties after an input node that has used the same shared libary.
Faced a similar problem. In my case, a message flow with an HttpRequest node using a DFDL domain parser / format to parse an HTTP response from the remote system threw this error (PIF data could not be found for the specified application). "Re-selecting" the same parser domain & message type on the node followed by build / redeploy solved the problem. Seemed to be a project reference related issue within the IIB toolkit.
you need to create static libraries and refer to application.
in compute node ur coding is based on dfdl body

hybris - Rest service 404 page not found

I installed a new instance of hybris server in a VM and made it available on a public internet page. I am trying to call the Product resource REST server or even a simple list of countries REST service.
http://xxx.xxx.com/ws410/rest/countries
However, I am getting an error with the status "HTTP/1.1 404 Not Found". Please can you help me?
Am I missing something? Should I Configure ws410 path somewhere?
Did you added platformwebservices extension into your localextensions.xml file ? Please ensure that you have below line in your localextensions.xml file
<extension name="platformwebservices" />
For more details check this.
ws410 is a default webroot path which is defined in platformwebservices/extensioninfo.xml file.
<webmodule jspcompile="false" webroot="/ws410"/>
Do you add the port 9001 par default on your URL. Try this http://xxx.xxx.com:9001/ws410/rest/countries

XDS.b testing with SoapUI

I have to implement a simple client to a XDS.b server (SubmitObjectRequest and RetrieveDocumentSetRequest operations), but I'm struggling to get even a simple example of use to work.
I've tried using Mirth Connect's Channel for XDS.b also, but with no use. I even tried to copy its SOAP envelope to use with SoapUI. Didn't work.
I'm using HIEOS deployed on Glassfish as my XDS.b server.
I'm lost and confused. Could anyone give me a guidance on how to make this work?
If the HIEOS is deployed correctly within the Glassfish the service endpoint provides a wsdl definition where the interface is specified. Check the Glassfish for the wsdl of the service.
http://localhost:8080/my-ws/simple?WSDL
Quelle: docs.oracle.com/cd/E18930_01/html/821-2418/gbiyw.html
The list of provided endpoints you can see here:
https://kenai.com/projects/hieos/pages/WebServices
So to retrieve the wsdl you should use for example:
http://localhost:8080/axis2/services/xdsrepositoryb?wsdl
which applies for the ProvideAndRegisterDocumentSet-b transaction of the XDS Repository actor.
You can use the WSDL definition to create a WS request using SOAP UI at first.
SOAP UI creates a request based upon the wsdl definition which can be used to
test a against your XDS repo.
When you know how a SOAP request must be constructed you can try it using Mirth or
create your own client using Apache CXF http://cxf.apache.org/ for example.
Or you use AXIS2 to create a client from the WSDL. Of course does Visual Studio and C# also offer mechanisms to create a WS client directly from a WSDL definition.

A system exception occurred during an invocation on EJB AuthenticationRequestFilter method public com.sun.jersey.spi.container.ContainerRequest

I am Using RESTful APIs in my application using Jersey 1.6.
Some database is also there.
I have created two .war files in my application. These are deployed on Glassfish server3.0.1 with no issues.(no errors/exceptions).
They make some REST calls to each other for transactions.(It has a proper xml format to send a transaction).
When I try to make a transaction it gives me exceptions like
A system exception occurred during an invocation on EJB AuthenticationRequestFilter method public com.sun.jersey.spi.container.ContainerRequest com.mypack1.mypack2.resources.filters.AuthenticationRequestFilter.filter(com.sun.jersey.spi.container.ContainerRequest)
javax.ejb.EJBException
at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:5119)
and at the end it says
[#|2011-04-26T12:06:32.356+0530|WARNING|glassfish3.0.1|org.apache.http.impl.client.DefaultHttpClient|_ThreadID=27;_ThreadName=Thread-1;|Authentication error: Unable to respond to any of these challenges: {}|#]
I am sure that the xml I send is correct according to database entries.(including authentication for the particular URL).
Is there anything like "container security". Whats may go wrong in this case.
Thanks in advance.