• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element

 
John Smith
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All:

I am using weblogic wls12120.
I used the ant task that comes with weblogic that generate proxy code from apache axis 1.4 web services.
The Apache axis Admin Service is a rpc-encode web service
<target name="compile_client_postalCode" >
<clientgen

wsdl="http://localhost:8081/Axis/services/AdminService?wsdl"


destDir="C:\TEST7"
packageName="com.apache104"
type="JAXRPC"
/>

Here is my client code:
package com.apache104;

import java.net.MalformedURLException;
import java.net.URL;
import java.rmi.RemoteException;

import javax.xml.rpc.ServiceException;

public class ClientAxisVersion1_0 {

private static String url = "http://localhost:8081/Axis/services/AdminService";
public static void main(String args[]) throws MalformedURLException, ServiceException, RemoteException
{
try
{
URL serviceURL = new URL(url);

AdminService service = new AdminService_Impl(url);
Admin port = service.getAdminService();

System.out.println("test");

}
catch (Exception e)
{
System.out.println("Exception:"+e.toString());
}
}
}

I get the following error:

Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element
at weblogic.xml.babel.baseparser.BaseParser.parseProlog(BaseParser.java:417)
at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:328)
at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)
at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
at weblogic.xml.domimpl.Loader.load(Loader.java:207)
at weblogic.xml.domimpl.Loader.load(Loader.java:73)
at weblogic.xml.domimpl.Loader.load(Loader.java:35)
at weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:122)
at weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:65)
at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:315)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitionsImpl.java:432)
at weblogic.wsee.wsdl.internal.WsdlDefinitionsImpl.parse(WsdlDefinitionsImpl.java:417)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:85)
at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:72)
at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:486)
at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:126)
at com.apache104.AdminService_Impl.<init>(AdminService_Impl.java:23)
at com.apache104.AdminService_Impl.<init>(AdminService_Impl.java:17)
at com.apache104.ClientAxisVersion1_0.main(ClientAxisVersion1_0.java:18)

This happen also on apache axis 1.0.

Here is the wsdl of the web service:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://xml.apache.org/axis/wsdd/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://xml.apache.org/axis/wsdd/" xmlns:intf="http://xml.apache.org/axis/wsdd/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema targetNamespace="http://xml.apache.org/axis/wsdd/" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="AdminService" type="xsd:anyType"/>
<element name="AdminServiceReturn" type="xsd:anyType"/>
</schema>
</wsdl:types>

<wsdl:message name="AdminServiceRequest">

<wsdl:part element="impl:AdminService" name="part"/>

</wsdl:message>

<wsdl:message name="AdminServiceResponse">

<wsdl:part element="impl:AdminServiceReturn" name="AdminServiceReturn"/>

</wsdl:message>

<wsdl:portType name="Admin">

<wsdl:operation name="AdminService">

<wsdl:input message="impl:AdminServiceRequest" name="AdminServiceRequest"/>

<wsdl:output message="impl:AdminServiceResponse" name="AdminServiceResponse"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="AdminServiceSoapBinding" type="impl:Admin">

<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="AdminService">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="AdminServiceRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output name="AdminServiceResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="AdminService">

<wsdl:port binding="impl:AdminServiceSoapBinding" name="AdminService">

<wsdlsoap:address location="http://localhost:8081/Axis/services/AdminService"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>


Any hint or help will be greatly appreciated it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!