Referenced file contains error at Liberty server.xml file - eclipse

I am receiving the following error at server.xml file liberty server. I couldn't solve this problem.
Referenced file contains errors (file:/D:/workspaces/myprojects/.metadata/.plugins/com.ibm.ws.st.core/Liberty Runtime/server.xsd). For more information, right click on the message in the Problems View and
select "Show Details..."
**My server.xsd file **
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ext="http://www.ibm.com/xmlns/dde/schema/annotation/ext">
<xsd:complexType name="com.ibm.ws.app.manager.webappcfg">
<xsd:annotation>
<xsd:documentation>Defines the properties of a web application.</xsd:documentation>
<xsd:appinfo>
<ext:label>Web Application</ext:label>
</xsd:appinfo>
</xsd:annotation>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="startAfter" type="com.ibm.ws.app.manager-factory">
<xsd:annotation>
<xsd:documentation>Specifies applications that are required to start before this application can begin starting. </xsd:documentation>
<xsd:appinfo>
<ext:label>Start After</ext:label>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="classloader" type="com.ibm.ws.classloading.classloader">
.
.
.
I want to get rid of this error.
Error Details:
enter image description here

Related

XSD for receiving PDF files in Oracle Service Bus

I am trying to write a service for Oracle Service Bus 12C to receive a PDF file.
The external service has two parameters of the format:
http://server.domain.com/documents?docId=12345&fetch=summary|document
If the parameter 'fetch' is sent with the value 'summary', it returns the summary information in JSON format. If the parameter value is 'document', it returns the PDF file with the Content-Type set as 'application/pdf'.
For the JSON response, the XSD is simple:
<?xml version = '1.0' encoding = 'UTF-8'?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://TargetNamespace.com/DocServices_getFile_response"
targetNamespace="http://TargetNamespace.com/DocServices_getFile_response"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
elementFormDefault="qualified"
nxsd:version="JSON" nxsd:encoding="US-ASCII">
<xsd:element name="File-Proxy-Response-Root-Element">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="docCode" type="xsd:integer"/>
<xsd:element name="docDescription" type="xsd:string"/>
<...snip...>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:annotation xmlns="">
<xsd:appinfo>NXSDSAMPLE=</xsd:appinfo>
<xsd:appinfo>USEHEADER=false</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
But I can't figure out how to support receiving PDF response.

Group name attribute invalid

I am trying to create a Group.
Based on your documentation, I can create a "name" associated with that group in the source editor but I can't through the GUI. If I try and create one manually in the source it says that "name is not a valid attribute for group".
What am I doing wrong? I would like to add this for grouping like items.
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="myElm">
<xs:complexType>
<xs:sequence>
<xs:group name="myGroup" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Only the root element can have a name. When you reference it for inclusion, the name attribute is not valid.
Adding a name attribute in where is is referenced (i.e. ) will result in the error "name is not a valid attribute for group".
This conforms to the W3C XSD Standard. Using the UI it is not possible to perform this action, as name is not available, however you can do this by changing the source code.
<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid XML Studio - 30 Day Trial Edition 7.0.0.604 (http://www.liquid-technologies.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:group name="myGroup" />
<xs:element name="myElm">
<xs:complexType>
<xs:sequence>
<xs:group ref="myGroup" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
You can then add a particle (sequence/choice/all) to the group definition anb build up groups of elements that can be re-used as a block.

Failed to publish application to Azure Service Fabric cluster

I am trying to publish an application to Azure Service Fabric cluster. The moment I click publish from VS2015, I get those following errors:
"An error occurred reading the file xxx\publishprofiles\cloud.xml. There is an error in XML document (7, 6)"
"Object reference not set to an instance of an object"
This is the content of the Cloud.xml file:
<?xml version="1.0" encoding="utf-8"?>
<PublishProfile xmlns="http://schemas.microsoft.com/2015/05/fabrictools">
<ClusterConnectionParameters ConnectionEndpoint=... />
<ApplicationParameterFile Path="xxx\ApplicationParameters\Cloud.xml" />
<UpgradeDeployment Mode="Monitored" Enabled="true">
<Parameters FailureAction="Rollback" Force="True" />
<Parameters UpgradeReplicaSetCheckTimeoutSec="1" Force="True" />
</UpgradeDeployment>
</PublishProfile>
It seems that I can have only one of the parameters (FailureAction OR UpgradeReplicaSetCheckTimeoutSec) for VS2015 to successfully load the file.
I wonder if anyone has some insights into this issue?
There can only be one Parameters element. Combine all your parameters into just one Parameters element.
Example:
<?xml version="1.0" encoding="utf-8"?>
<PublishProfile xmlns="http://schemas.microsoft.com/2015/05/fabrictools">
<ClusterConnectionParameters ConnectionEndpoint=... />
<ApplicationParameterFile Path="xxx\ApplicationParameters\Cloud.xml" />
<UpgradeDeployment Mode="Monitored" Enabled="true">
<Parameters FailureAction="Rollback" Force="True" UpgradeReplicaSetCheckTimeoutSec="1" />
</UpgradeDeployment>
</PublishProfile>

Confusion regarding passing a SOAP related XML request:

I have the following message available in the WSDL:
<message name="checklookupRequest">
<part name="mobileNumber" type="xsd:string" />
<part name="userName" type="xsd:string" />
<part name="password" type="xsd:string" />
</message>
I have created the following request inside the body tag of coldfusion page:
<cfsavecontent variable="soapBody">
<cfoutput>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:p1 = "https://abcd/checkLookup.php?wsdl" >
<soap:Header>
</soap:Header>
<soap:Body>
<p1:checklookupRequest>
<phonenumber>4135671234</phonenumber>
<username>test</username>
<password>password</password>
</p1:checklookupRequest>
</soap:Body>
</soap:Envelope>
</cfoutput>
</cfsavecontent>
My question is that, I am using username and password in the cfhttp tag as well. So, it seems like I am bound to send username and password as a part of message invocation and as a part of cfhttp requirements. Please correct me if I am wrong.
Thanks
P.S: I don't have any Web API documentation available for the Web Service I am using.

Communicating to WSDL using SOAP, I don't know how to form correctly my SOAP to interact with the WSDL in a remote server

I have to make a request to a web service, that uses Axis2, I'm too close to have it working but i keep getting error messages and i'm sure it is in the construction of my SOAP XML. This was the SOAP:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Header>
<RequestsoapHeader>
<spId>SPID</spId>
<spPassword>RandomPass</spPassword>
<timeStamp>20130115160251</timeStamp>
</RequestsoapHeader>
</soap:Header>
<soap:Body>
<operation>
<name>getSPToken</name>
<input>http://zzz.zzz.zzz.zzz/my/redirection/url/</input>
</operation>
</soap:Body>
</soap:Envelope>
UPDATE!!!! Now the soap is this:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Header>
<RequestsoapHeader>
<spId>SPID</spId>
<spPassword>RandomPass</spPassword>
<timeStamp>20130115160251</timeStamp>
</RequestsoapHeader>
</soap:Header>
<soap:Body>
<getSPTokenRequest>
<SPredirectURL>http://zzz.zzz.zzz.zzz/my/redirection/url/</SPredirectURL>
</getSPTokenRequest>
</soap:Body>
</soap:Envelope>
The part i can't fix is the Body, i tried to call the operation in different ways, for example instead of <operation> i used <operation name="getSPToken">, i also tried not using operation and created a tag with the name: <getSPToken>, but nothing works.
This is the WSDL part that describes the operation i'm trying to call in the Web Service:
<wsdl:operation name="getSPToken">
<soap:operation soapAction="" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ServiceException">
<soap:fault name="ServiceException" use="literal"/>
</wsdl:fault>
<wsdl:fault name="PolicyException">
<soap:fault name="PolicyException" use="literal"/>
</wsdl:fault>
</wsdl:operation>
UPDATE!!! This is the interface XML (part of the WSDL) that i didn't post before:
<wsdl:types>
<xsd:schema elementFormDefault="qualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.csapi.org/schema/parlayx/sicoweb/v1_0/local">
<xsd:element name="getSPTokenRequest" type="osg_sicoweb_local_xsd:getSPTokenRequest"/>
<xsd:complexType name="getSPTokenRequest">
<xsd:sequence>
<xsd:element name="SPredirectURL"
type="xsd:string" maxOccurs="1" minOccurs="1">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="getSPTokenResponse" type="osg_sicoweb_local_xsd:getSPTokenResponse"/>
<xsd:complexType name="getSPTokenResponse">
<xsd:sequence>
<xsd:element name="SPToken" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
And this is the response i was getting:
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=UTF-8
Date: Tue, 15 Jan 2013 21:10:49 GMT
Connection: close
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault xmlns:axis2ns73="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>axis2ns73:Client</faultcode>
<faultstring>The endpoint reference (EPR) for the Operation not found is http://xxx.xxx.xxx.xxx:xxx/path/to/service/ and the WSA Action = </faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
UPDATE!!!! With the new changes, the response i'm getting is this one:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>org.apache.axis2.databinding.ADBException: Unexpected subelement getSPTokenRequest</faultstring>
<detail />
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
The operation getSPToken receives one parameter called SPredirectURL, that contains a URL of redirection, please help.
Try one of the following as your body:
<soap:Body>
<SPredirectURL>http://zzz.zzz.zzz.zzz/my/redirection/url/</SPredirectURL>
</soap:Body>
<soap:Body>
<getSPTokenRequest xmlns="http://www.csapi.org/schema/parlayx/sicoweb/v1_0/local">
<SPredirectURL>http://zzz.zzz.zzz.zzz/my/redirection/url/</SPredirectURL>
</getSPTokenRequest>
</soap:Body>
Based on the WSDL snippet, the web service endpoint is using the document/literal convention for messages, but without the WSDL message declarations it is unclear whether the 'bare' (first example) or 'wrapped' (second example) version is expected. The post at this address (http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/) gives good insight into the various dialects described by WSDL.
UPDATE:
Based on the schema inside the wsdl:types section, the fully-qualified name for the element expected by the service (based on the declared targetNamespace attribute of the schema element) is http://www.csapi.org/schema/parlayx/sicoweb/v1_0/local{getSPTokenRequest}
One way of establishing that name (inline namespace declaration) is shown in the updated second body above.
Post back with the next iteration.