Saturday, August 31, 2013

SOA 11g- "oracle.xml.parser.v2.XMLParseException: Whitespace required" Error

In my project I have one EBS service which is getting invoked from Requester service. We put EBS abstract WSDL file in MDS and in requester service we are referring EBS WSDL from MDS. Since EBS WSDL is abstract so "port" and "location" attribute will remain empty when we create partner link using EBS abstract WSDL file.

<reference name="CustomerEBS" ui:wsdlLocation="oramds:/apps/EnterpriseServiceLibrary/Customer/CustomerEBS.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/TestApplication/CustomerEBS/CustomerEBS/CustomerEBS#wsdl.interface(CustomerEBS)"/>
    <binding.ws port=""  location="" />
  </reference>

 We have to manually enter those values.

<reference name="CustomerEBS" ui:wsdlLocation="oramds:/apps/EnterpriseServiceLibrary/Customer/CustomerEBS.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/TestApplication/CustomerEBS/CustomerEBS/CustomerEBS#wsdl.interface(CustomerEBS)"/>
    <binding.ws port="http://xmlns.oracle.com/TestApplication/CustomerEBS/CustomerEBS/CustomerEBS#wsdl.interface(customerebs_ep/execute_pt)"  location="http://localhost:8081/soa-infra/services/default/CustomerEBS/customerebs_ep" />
  </reference>


When we deploy our requester service which is calling EBS service , we may get below error.


Error:

"Cannot read WSDL "{http://xmlns.oracle.com/TestApplication/CustomerEBS/V1.0}customerebs_ep" from Metadata Manager.: WSDLException: faultCode=INVALID_WSDL: Invalid XML in document at: http://localhost:8081/soa-infra/services/default/CustomerEBS/customerebs_ep, line: {1}, column: {2}: oracle.xml.parser.v2.XMLParseException: Whitespace required.</summary>"

But when we try to open your EBS endpoint(http://localhost:8081/soa-infra/services/default/CustomerEBS/customerebs_ep) then we don't see any issue with it but still error is coming.


Solution: 

The reason for above error is very simple. Value in location attribute is not right. Location attribute always contain WSDL URL not endpoint URL.

Below is correct reference to Customer EBS.

<reference name="CustomerEBS" ui:wsdlLocation="oramds:/apps/EnterpriseServiceLibrary/Customer/CustomerEBS.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/TestApplication/CustomerEBS/CustomerEBS/CustomerEBS#wsdl.interface(CustomerEBS)"/>
    <binding.ws port="http://xmlns.oracle.com/TestApplication/CustomerEBS/CustomerEBS/CustomerEBS#wsdl.interface(customerebs_ep/execute_pt)"  location="http://localhost:8081/soa-infra/services/default/CustomerEBS/customerebs_ep?wsdl" />
  </reference>


Tuesday, August 27, 2013

SOA 11g- “Deployment Failed: Unable to register service” error while deploying SOA web service

We usually encounter below error when we deploy SOA Composite to server.


[12:17:36 PM] Error deploying archive sca_SampleBPEL_rev1.0.jar to partition "Default" on server LOCAL_SOA [http://localhost:8001]
[12:17:36 PM] HTTP error code returned [500]
[12:17:36 PM] Error message from server:
There was an error deploying the composite on LOCAL_SOA: Deployment Failed: Unable to register service.
[12:17:36 PM] Check server log for more details.
[12:17:36 PM] Error deploying archive sca_SampleBPEL _rev1.0.jar to partition "Default " on server LOCAL_SOA [http://localhost:8001]
[12:17:36 PM] #### Deployment incomplete.  ####
[12:17:36 PM] Error deploying archive file:/C:/JDeveloper/mywork/TestApplication/SampleBPEL/deploy/sca_SampleBPEL _rev1.0.jar
 (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)


We cannot identify what exactly causing this by seeing above error. But below are the main reasons for above error.

·         WSDL or XSD is not deployed to MDS (Missing MDS deployment)

·         Something is wrong with WSDL or XSD.

·         XSD references in your WSDL is not right.


To see the exact cause you can check the SOA server Diagnostic log file. You can find that file at below location.

user_projects / domains / <your domain> / servers / <your soa server> / logs / <you soa server>-diagnostic.log.