Dowloading Binary from BEA Repository
Hi,
Im having problems in creating a link to down load a binary file from the repository. I have a list of files produced via a contentSelector. But cant seem to be able to create a valid link in the JSP. Is there anywhere that i can find an example on how to acheive this.
Thanks
Take a look at the DownloadBinaryServlet and its javadoc. By default, this is registered (in web.xml) to service URLs of the form /DownloadBinaryServlet/*
You should be able to construct a URL to the DownloadBinaryServlet for your link, by specifying the NodeID or path (and optionally the property name). When the link is clicked, the binary can be downloaded.
-Steve
Similar Messages
-
How put content from Bea repository
I can't put content from bea repository to a jsp, i read the e-docs of portal 10, but it didn't work.. someone can help me with that.. some link that show how to do it?
Some tutorial or manual to do it.
PS: I use weblogic portal 10 ??.There is no API or tooling to approve content in bulk, but you could use the existing API to recursively traverse the content by path and approve as you go. We have an enhancement request covering the need for bulk approval.
-Ryan -
How to fetch an image from bea repository.
Dear ALL,
I have two binary properties named image and altImage in the content item of one
of the nodes in the virtual repository. Looks like, BEA arranges all the properties
alphabetically and when I use showBinary servlet to display a binary property,
it displays the uploaded image from the altImage property(because it starts with
a alphabet). But when I make the other image property PRIMARY, ShowBinary servlet
displays the uploaded image from the image property but I could not show uploaded
file from altImage property.
The SYNTAX used by me is,
<img src="<%=request.getContextPath() + "/ShowBinary" + conItem.getPath()%>" width="791"
height="150" border="0" >
Is there a way where I can show the selective binary(jpg/gif only) properties
using /ShowBinary, if no, can you guide me to another way of doing the same.
Vijay B.Vijay,
Sorting on search will only work with system properties. For a list of system
properties please take a look at com.bea.content.expression.Search on the javadoc
site at http://e-docs.bea.com/wlp/docs81/javadoc/index.html. I'll add the ability
to sort on non-system properties as a feature request for next release.
James
"Vijay Bijjargi" <[email protected]> wrote:
>
Thanks alot.
I have one more query. I would appreciate if you help me. Thanks in advance.
There is a attribute(property) of contentselector
named sortBy(even in cm:search). But when I run my jsp, It could fetch
the
contents from the repository but It could not sort by a specified field
of
a repository.
Can you pls tell me the right way of using it or why it is not showing
me
the expected result.
Thanks.
Vijay Bijjargi
[email protected]
Mumbai, India
"Markus Blumrich" <[email protected]> wrote:
Vijay, I brought this up during beta testing and the response from BEA
was
that you would be able to use ShowBinary on any property in GA by appending
the name of the property with two slashes to your URL... example:
/ShowBinary/my/url//myBinProperty
I haven't had time to see if it works yet,
Markus
"Vijay Bijjargi" <[email protected]> wrote in message
news:[email protected]...
Dear ALL,
I have two binary properties named image and altImage in the contentitem
of one
of the nodes in the virtual repository. Looks like, BEA arranges allthe
properties
alphabetically and when I use showBinary servlet to display a binaryproperty,
it displays the uploaded image from the altImage property(because
it
starts with
a alphabet). But when I make the other image property PRIMARY, ShowBinaryservlet
displays the uploaded image from the image property but I could notshow
uploaded
file from altImage property.
The SYNTAX used by me is,
<img src="<%=request.getContextPath() + "/ShowBinary" +conItem.getPath()%>" width="791"
height="150" border="0" >
Is there a way where I can show the selective binary(jpg/gif only)properties
using /ShowBinary, if no, can you guide me to another way of doingthe
same.
Vijay B. -
Recursively publish content from BEA Repository
Hi.
Weblogic Portal 9.2, Content Management:
I have moved all our content from the test system to the production environment using propagation. The test system had versioning enabled and when the content was propagated the workflow status disapeared and all content ended up with status Draft...
Is there something I can do to recursevely set all content to a published state? There's a lot of content and I don't wanna go through it all again...
Thanks in advance.There is no API or tooling to approve content in bulk, but you could use the existing API to recursively traverse the content by path and approve as you go. We have an enhancement request covering the need for bulk approval.
-Ryan -
Use Documentum Content Repository to BEA Repository
Hi,
I want to migrate content from BEA Repository to Documentum Content Repository. I would like to know if there are any standard API's to display content from Documentum to Portal jsp pages?
Any help is greatly appreciated.
Thanks,
LathaYou can use the CMSPI implemented by Documentum. But it is a separate
license.
<Sailatha Kapavarapu> wrote in message news:[email protected]..
Hi,
I want to migrate content from BEA Repository to Documentum ContentRepository. I would like to know if there are any standard API's to display
content from Documentum to Portal jsp pages?
>
Any help is greatly appreciated.
Thanks,
Latha -
How to Export/Import Datas from BEA content Repository
Hi,
I want to Export the datas from BEA content repository and import into the ORacle Repository. Can anybody please let me know how to do that . Thanks in advance.
Best regards,
Venkat.Scopy the files from
(username)/library/preferences/AICS3settings/en_us/workspaces
to
(username)/library/preferences/AICS5settings/en_us/workspaces -
How to fetch mpg file from content repository
Hi All,
I have uploaded a mpg(video) file in content repositoy. But I am not able to fetch
it and display it using embed tag.
is anybody aware of a right method to do the same?
Thanks in advance.I was thinking there might be a difference in how the browser handles a
path with a space when typed into the address bar vs. how the browser
plugin/activex-object handles a path with a space when it gets it from
the <param> or <embed> tag.
Otherwise, I'm not sure what's going on. How content displays on
someone's computer mostly depends on the persons's computer, how it's
configured, what's installed, etc. If you can get the Node's BinaryValue
from the WLP server and it has the correct ContentType and the correct
bytes, then, at that point, WLP is no longer really involved.
Do PDFs, word docs, audio, shockwave, and other binary media types
stored in a WLP content repository display correctly with
<object><embed> tags in your browser?
Vijay wrote:
Hi Gregory Smith,
There is no problem with path at all. The same path if I write in address bar
of browser it opens a widows media player and plays the video file.
Pls suggest.
Vijay B.
Gregory Smith <[email protected]> wrote:
See if using a path of
http://etgjw4:7001/JWWebApp/ShowBinary/BEA+Repository/Ads/AdsPopup/ad1//image
(note the + between BEA and Repository) changes anything. If so, you
can
use the com.bea.content.manager.ContentHelper.pathInfoEncode() method
to
URLEncode the node path, e.g.
http://etgjw4:7001<%=request.getContextPath()%>/ShowBinary<%=ContentHelper.pathInfoEncode(node.getPath())%>//image
or, the <cm:getProperty> tag supports this automatically, e.g:
http://etgjw4:7001<%=request.getContextPath()%>/ShowBinary<cm:getProperty
name="cm_path" node=<%=node%> conversionType="url"/>//image
(You might need to double check that code in workshop to make sure it
compiles).
Greg
Vijay wrote:
Hi Gregory,
When I type the repository path //property name in the browser's addressbook,
It opens a windows media player and plays the video file.
But when I copy the same path and paste it in embed/object tag it justloads up
a windows media player. When I see the error details it says "Cannotopen. Please
verify that the path and filename are correct and try again." Thereis a advanced
button on error window clicking on that it shows "The specified streamtype is
not recognized. (Error=C00D07E2)
Cannot open. Please verify that the path and filename are correctand try again.
(Error=C00D07E2)".
can you give me a solution on this?
The HTML code that I have written is attached to this query.
Thanks alot,
Vijay
Gregory Smith <[email protected]> wrote:
First, make sure the BinaryValue of the property of the Node has the
correct content-type (should be video/mpeg, or similar). This can be
in
1 of the following ways:
1. Look in the BLOB_CONTENT_TYPE column of the CM_PROPERTY table.
2. Get the Node (e.g. with <cm:getNode>), then get the BinaryValue
(with
<cm:getProperty>), and call the getContentType() method of the BinaryValue.
3. Show the ShowBinaryServlet on the Node in the browser and see what
your browser does. The URL would probably be something like
http://<server>:<port>/<webapp>/ShowBinary/<path to node>, e.g.
http://localhost:7001/sampleportal/ShowBinary/BEA+Repository/mynode.
You
can bring up the properties for that in IE, or Page Info (Ctrl-I) in
Mozilla; that should tell you the content type the browser received.
If it's not something like video/mpeg, then that's why it's not working.
Make sure you browser has support of mpegs in <embed> by creating a
simple html file with an <embed> to an mpeg file (don't use the server
at all). If that works and the content-type of the node is correct,you
should be to create an html file with an <embed> to the URL in #3 above,
e.g.
<embed
src="http://localhost:7001/sampleportal/ShowBinary/BEA+Repository/mynmode">
</embed>
If that works, make sure your jsp is generating the correct HTML.
Greg
Vijay wrote:
I am using weblogic 8.1.
Gregory Smith <[email protected]> wrote:
What version of WLP are you using?
Vijay wrote:
Hi All,
I have uploaded a mpg(video) file in content repositoy. But I am
not
able to fetch
it and display it using embed tag.
is anybody aware of a right method to do the same?
Thanks in advance.
New Web Application Page -
How to create a folder under BEA Repository through code
Hi All,
We are trying to create a folder under the BEA Repository through Java code. Could you please post the right API for it.
We have tried the InodeManger class and its addNode method, which is good for creating any content, but we are trying to create the folder itself from the code.
Thanks
VeeraHi Veera,
You're on the right track. The INodeManager.addNode method is the way to go. You just need to specify an object class name of a folder object class. Out of the box there's one, and this is configurable for your given repository's configuration. Once you add nodes of this type they'll be badged as folders in the portal admin tools.
-Ryan -
Auto Archiving Files in BEA repository
I need to find out if the following is possible in BEA content repository:
For files within a node that you create in the BEA repository, is there anyway to 'auto archive' these files?
For example, there are 10 files in 'Latest News' node. Out of these 10 files, there are 5 expired files that I do not want anymore.
Is there a way to 'auto' move these 5 files to another node e.g., 'Expired News', instead of manage these file from the portal admin console?
Rgdsif you manage to extend you contentquery to take into account the parameters to search for, try this.
- Anders M. -
JCR interface to the BEA repository
Is there a way to access the BEA repository via a JCR based client? And I am talking about the repository implementation here and not the Virtual Content Repository.
I have a situation where I have to migrate some content into the BEA repository from another CMS...I don't have knowledge of the internals of the JCR bridge but my understanding is that it bridges between SPI (Weblogics legacy CMS interface) and JCR complient servers (not clients).
-
Slow content retrieval from content repository on Weblogic8.1 portal server
The performance of content retrieval from content repository on Weblogic8.1 portal
server is very slow. Image retrieval takes too much time. Is there any solution
or workaround to improve the performance.More information is required to help you.
What is the time for retrieval? What is the time for the entire page load?
What database are you using?
How many Nodes are in the repository?
What do the Node types (a.k.a. Object Classes) look like? How many
properties per Node?
If using Oracle or MSSQL, did you run statistics.sql?
(http://google.bea.com/search?restrict=wlp81&ie=&q=statistics.sql&site=bea&output=xml_no_dtd&client=bea&access=p&lr=&btnG.y=0&btnG.x=0&ip=216.148.48.12&proxystylesheet=http%3A%2F%2Fdev2dev.bea.com%2Fimages%2Fdev2dev.xsl&oe=&filter=p)
Have you adjusted or disabled the content caches?
Greg
Koshy Varghese wrote:
The performance of content retrieval from content repository on Weblogic8.1 portal
server is very slow. Image retrieval takes too much time. Is there any solution
or workaround to improve the performance. -
Issue in adding Space to the existing Virtual Machine from added repository
Hi,
I'm facing issue in adding Space to the existing Virtual Machine (Guest OS) from added repository.
Environment details :
VM Server : /OVS => 130GB
/OVS/935970F2CC2D4B4391701397517F1001/ => 512 GB
Things I have done :
• I created a VM (Guest OS) in the VM Server with 120 GB
• After creating the VM (Guest OS) , When I tried adding a VIRTUAL DISK of size 150 GB , I got an error “Maximum available Disk space is only 10GB”.
My query :
• Will I be able to add space to Existing VM from the added Repository ( /OVS/935970F2CC2D4B4391701397517F1001/ ) , whose system.img is stored in path /OVS/running_pool/34_rhel/ .
Kindly help me out in this.
Thanks in advance.
-- SriHi all,
I checked with Oracle on the above and got the info currently , the we can utilise only the space available in the existing repo and cannot extend to additional repo.
Work around is : Clone it to the other repo , or Use Symbolic link .
Thanks,
Sri. -
How to open an InDesign file from CMIS repository?
We are using CS SDK 2.0 , looking to use CMIS to keep versionning of .indd file. The uss case as following:
form our de4veloped InDesign pluging, user click a button
the button will open a .indd file from cmis repository
plugin check-out the file, open it within InDesign IDE
user make changes
user make save
the plugin export a pdf and swf files from the current document, if the files exists it will update, aslo on CMIS repo to keep also versions of exported pdf and swf, if files not exist in first time .. it will create
when user clos the document , it will check it in.
the problem there is no sufficent sample code for, even was thinking to use Adobe Drive, but there is no Adobe Drive SDK for Flex.
i used to fuse the sdk, but
private function getFileByPath(sPath:String):Fileable {
appStatus = ">> get File By Path";
message = "";
viewEnabled = false;
var request:GetObjectByPathRequest = new GetObjectByPathRequest(session);
var oFileable:Fileable;
request.path = sPath;
request.execute(onSuccess, onError);
function onSuccess (event:GetObjectByPathResponse) : void {
oFileable = event.object;
//var oDoc2:Document = new Document(event.object);
doc = event.object as Document ;
//children = new ArrayCollection(vectorToArray(event.target));
appStatus = ">> getFileByPath : Success";
viewEnabled = true;
return oFileable;
private function checkOutFile(oFile:Document):Document{
appStatus = ">> Check Out File";
message = "";
viewEnabled = false;
var request:CheckoutRequest = new CheckoutRequest(session);
request.object = doc;
var oDocument:Document;
request.execute(onSuccess, onError);
function onSuccess (event:CheckoutResponse) : void {
oDocument = event.object ;
appStatus = ">> Check Out File : Success";
viewEnabled = true;
return oDocument;
private function openTestFile():void {
appStatus = "Open Test File";
message = "";
viewEnabled = false;
var oFile:Fileable = getFileByPath("/Collaboration/test.indd");
//var oDoc2:Document = new Document(oFile);
var oDoc:Document = checkOutFile(doc);
i do not know what method in the CS SDK to open document fom active window and how to map CMIS Document to com.adobe.indesign Document ?Dear Seoras
i fixed the to return the cmis path:
public function resolveRemotePath(file:File):String
if (file.nativePath.indexOf(LOCAL_FILE_CACHE.nativePath) != 0)
return null;
var remoptePath:String =file.nativePath.substr(LOCAL_FILE_CACHE.nativePath.length);
trace("resolveRemotePath [11] : "+ remoptePath);
if(File.separator!="/") {
//var pattern:RegExp = /(\/)/g;
var pattern:RegExp = /(\\)/g;
remoptePath = remoptePath.replace(pattern ,"/");
trace("resolveRemotePath [22] : "+ remoptePath);
return remoptePath;
i have another issue, why everytime update the generated pdf it creates new pdf file with same name in the cmis repo .. does the pdf is not updatable over the cmis service ???
Regards -
Problem: Unable to retrieve workflow data from MDM repository
This is a new MDM installations scenario for version 5.5 SP05 (5.5.40.83).
After installing MS Visio, finding problems connecting it with the MDM Data Manager. After doing MDM workflow installations, able to initiate the MS Visio Workflow from MDM Data Manager and can see the Pane-MS Visio Workflow Stencil but not the able to see the Pane-MS Visio Workflow Stencil Details that appears below the Pane-MS Visio Workflow Stencil. Secondly geting a pop-up with the error message as - 'Unable to retrieve workflow data from MDM repository.'
I have added a parameter Mail Server=MailServerIPAddess (the existing IP addr), but it hasn't helped.
Can any one please help me in this !Hi
As Felix mentioned, it might be a version compatibility problem.
You have also mentioned that mail server is not working for that do this
Mailserver = SMTP server.company.com ( ex. Mail.company(xxxxx).com)
MDM workflow notify task is working after rebooting the Machine. So the rule is after making changes to MDS.ini file reboot the machine ,to observe the consequence of configurable changes.
If u need anything this let me know.
Regards
Hari -
Problem in calling a web service hosted on tomcat from BEA WebLogic portal
Hi,
I have a wsdl file for my web service which is hosted on apache tomcat 5.5(running on port : 8080). The contents of the wsdl file are-
*<?xml version="1.0" encoding="UTF-8"?>*
*<wsdl:definitions targetNamespace="http://soa.tutorials.serg.edu" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://soa.tutorials.serg.edu" xmlns:intf="http://soa.tutorials.serg.edu" 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 elementFormDefault="qualified" targetNamespace="http://soa.tutorials.serg.edu" xmlns="http://www.w3.org/2001/XMLSchema">*
*<element name="getNums">*
*<complexType>*
*<sequence>*
*<element name="n" type="xsd:int"/>*
*<element name="m" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*<element name="getNumsResponse">*
*<complexType>*
*<sequence>*
*<element maxOccurs="unbounded" name="getNumsReturn" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*<element name="getNums2">*
*<complexType>*
*<sequence>*
*<element name="n" type="xsd:int"/>*
*<element name="m" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*<element name="getNums2Response">*
*<complexType>*
*<sequence>*
*<element maxOccurs="unbounded" name="getNums2Return" type="xsd:int"/>*
*</sequence>*
*</complexType>*
*</element>*
*</schema>*
*</wsdl:types>*
*<wsdl:message name="getNums2Request">*
*<wsdl:part element="impl:getNums2" name="parameters"/>*
*</wsdl:message>*
*<wsdl:message name="getNumsRequest">*
*<wsdl:part element="impl:getNums" name="parameters"/>*
*</wsdl:message>*
*<wsdl:message name="getNums2Response">*
*<wsdl:part element="impl:getNums2Response" name="parameters"/>*
*</wsdl:message>*
*<wsdl:message name="getNumsResponse">*
*<wsdl:part element="impl:getNumsResponse" name="parameters"/>*
*</wsdl:message>*
*<wsdl:portType name="Echo">*
*<wsdl:operation name="getNums">*
*<wsdl:input message="impl:getNumsRequest" name="getNumsRequest"/>*
*<wsdl:output message="impl:getNumsResponse" name="getNumsResponse"/>*
*</wsdl:operation>*
*<wsdl:operation name="getNums2">*
*<wsdl:input message="impl:getNums2Request" name="getNums2Request"/>*
*<wsdl:output message="impl:getNums2Response" name="getNums2Response"/>*
*</wsdl:operation>*
*</wsdl:portType>*
*<wsdl:binding name="EchoSoapBinding" type="impl:Echo">*
*<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>*
*<wsdl:operation name="getNums">*
*<wsdlsoap:operation soapAction=""/>*
*<wsdl:input name="getNumsRequest">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:input>*
*<wsdl:output name="getNumsResponse">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:output>*
*</wsdl:operation>*
*<wsdl:operation name="getNums2">*
*<wsdlsoap:operation soapAction=""/>*
*<wsdl:input name="getNums2Request">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:input>*
*<wsdl:output name="getNums2Response">*
*<wsdlsoap:body use="literal"/>*
*</wsdl:output>*
*</wsdl:operation>*
*</wsdl:binding>*
*<wsdl:service name="EchoService">*
*<wsdl:port binding="impl:EchoSoapBinding" name="Echo">*
*<wsdlsoap:address location="http://localhost:8080/SOATest/services/Echo"/>*
*</wsdl:port>*
*</wsdl:service>*
*</wsdl:definitions>*
I created a client from the above wsdl file using ClientGen wizard in WebLogic. This client contains the follwoing classes-
Echo.java
EchoService.java
EchoService_Impl.java
Echo_Stub.java
I created a JSP portlet and the jsp content of it is-
String url = "http://localhost:8080/SOATest/services/Echo";
Echo echo = new EchoService_Impl(url).getEcho();
getNumsResponse = echo.getNums(getNums);
I tried to call that web service from BEA weblogic portal through a JSP potlet. I got an error saying -
*<An exception [javax.xml.rpc.ServiceException: Failed to parse WSDL http://localhost:8080/SOATest/services/Echo weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element] was thrown while rendering the content at [TestEcho.jsp].*
*javax.servlet.ServletException: javax.xml.rpc.ServiceException: Failed to parse WSDL http://localhost:8080/SOATest/services/Echo weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
* at weblogic.servlet.jsp.PageContextImpl.handlePageException(PageContextImpl.java:420)*
* at jsp_servlet.__testecho._jspService(__testecho.java:112)*
* at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)*
* at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)*
* at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)*
* Truncated. see log file for complete stacktrace*
*javax.xml.rpc.ServiceException: Failed to parse WSDL http://localhost:8080/SOATest/services/Echo weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
* at weblogic.wsee.jaxrpc.ServiceImpl.throwServiceException(ServiceImpl.java:174)*
* at weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:485)*
* at weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:119)*
* at edu.serg.tutorials.soa.EchoService_Impl.<init>(Unknown Source)*
* at edu.serg.tutorials.soa.EchoService_Impl.<init>(Unknown Source)*
* Truncated. see log file for complete stacktrace*
*weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
* at weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:313)*
* at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:405)*
* at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:391)*
* at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:79)*
* at weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:66)*
* Truncated. see log file for complete stacktrace*
*java.io.IOException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
* at weblogic.xml.domimpl.Loader.load(Loader.java:38)*
* 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:311)*
* at weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:405)*
* Truncated. see log file for complete stacktrace*
*javax.xml.stream.XMLStreamException: Error at Line:2, token:[OPENTAGBEGIN]All tags must be contained within a single element*
* at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:206)*
* at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)*
* at weblogic.xml.domimpl.Loader.load(Loader.java:112)*
* at weblogic.xml.domimpl.Loader.load(Loader.java:73)*
* at weblogic.xml.domimpl.Loader.load(Loader.java:35)*
* Truncated. see log file for complete stacktrace*
*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:112)*
* Truncated. see log file for complete stacktrace*
My web service is using soap binding. I have tested it with eclipse and other tools also. It is working well and good. But when I tried to call a web service which is created and hosted on WebLogic server(running on port : 7001), I got the correct output.
Can anyone help me out in calling a web service hosted on different server from WebLogic server.
Thanks in advance,
Tiijnar
Edited by: user8715057 on Aug 13, 2009 1:11 AMHi
1. The way you are invoking the WebService deployed on Tomcat server is looks suspicious. It may be valid by adding extra ?wsdl etc into the url, but still I have not seen this way to invoke the webservice.
2. So you used Weblogic ant task to generate client JARs by giving this WSDL. So looks like it generated the 4 classes (.java) and in addition any other classes for Request/Response xml objects.
3. Look at the source code of EchoService.java. It should have one default empty constructor. Internally it uses the default wsdl defined in this class. You will see another constructor that takes WSDL URL as one of the parameters (QName) etc. Echo.java is the class corresponding to the Port. In the same EchoService you should see an instance method like getEcho() something like that. This Echo.java class will have methods for all the Operations defined on this Port. So the standard code snippet we use most of the times will be like this:
EchoService myEchoService = new EchoService(); // Default it uses WSDL deployed on Tomcat at localhost:8080
Echo myEchoPort = myEchoService.getEchoPort(); // Something along these lines.
myEchoPort.xxxYYY(); // NOW this is the operation name that takes the input parameters and returns outputs defined as per the WSDL defintions. If the Input and Outputs are complex xml types, it will have corresponing .JAVA files with setters and getters.
Now if this WebService is deployed on same Tomcat but on different machine or different port, you just give the full WSDL URL with that host and port in the constructor for new EchoService(...). You may need to instantiate QName object. But look at the methods generated in EchoService.java class.
The way you are using with Impl and Stubs class may also work. I am not much famiiar with this APIs apporach. Still look at the methods generated in these classes.
Also if you latest Sun JDK 1.6, it also has one command like wsimport. Infact if you install WLS 10.3 with Sun JDK, it should have C:\beawlp103\jdk160_05\bin\wsimport command. This will also generate client jar given a WSDL URL.
Thanks
Ravi Jegga
Maybe you are looking for
-
What is the purpose of Clearing and Revenue account in Asset Disposal : F-92?
Hi All, Please clarify my doubt ; In Asset Disposal - Sale to Customer : F-92 with customer Suppose an asset with historical cost $1000 and accumulated depreciation of $100 is being sold to a customer at $1100, the posting entries will be as follows
-
HP4700 print order duplex printing
We have a 4 bin HP4700 color laserjet in the office. The top bin (2) has a printed letterehead. This works fine if you print single-sided (simplex) but if you tick the box to print Duplex in Finishing it prints the first page on the BACK of the paper
-
Url for the 5.1 upgrade ???
what is the direct url to download the new update for the 5.1 ???
-
Saving NSView to Bitmap - (ScrollView)
I have an NSView subclass called StretchView. Here's what I want to do: Since the StretchView has scrollbars and is extended via those scrollbars I want to be able to grab the entire StretchView (including the area not visible on screen) and save tha
-
Subscriber cannot see my shared photo stream! Why?
I have just created a shared photo stream and added a subscriber. They were notified by email, but when they clicked on the link, it told them that "This photo stream is no longer shared". It is still shared and I can access it!