XML - RPC Fetchlet

Looking through the catalogue of Fetchlet, I see no SOAP, but no XML - RPC.

It is possible to deliver a new Fetchlet type with a management plug-in? This is another topic, I really don't see covered in immediate docs I have maybe the answer is just 'no '?

If it is not possible to deliver a 'first class' fetchlet, it seems that the only way 'out' of the environment is the OSCommandFetchlet. At this point, is there language guarantees or I will have to bring those with my Fetchlet:
-Many examples use Perl, I noticed or lines of Unix command, is ActiveState Perl included with the network (Windows) Manager?
-Are there performance security Java I could access and the place of my own .jar file somewhere that I could find?

Paul

Customer Fetchlets cannot be packaged with the plug-in. Maybe it's something that "possibly" can be done in the future, but by when and how - its too early for me to comment.

I did not quite understand what you mean by - "...". are there any language guarantees... ».

However, I will try to give some details (with examples) to a level that I understand your query on what you want to do your plug-in

1 Perl version support with 10 g EM Agents was 5.8.3
2. how to set the descriptor of the query into a metadata type target xml binary perl WRT can be as follows:

scriptsDir
perlBin

%perlBin%/Perl %scriptsDir%/emx/myscript.pl

3. to the best of my knowledge, ActiveState perl is not part of the installation of the Agent of the EM. However, I am not sure
Similarly. You can search the perl modules under $Agent_home/perl (linux) or %Agent_home\perl\5.8.3\lib
(under windows) for details and confirmation
4. associated with your query on java runtime, there are three ways.
One way is to use OSLineToken and specific command like
%emdRoot%/JDK/bin/Java-Djava.library.path=%DLL% - classpath %emdRoot%/sysman/admin/script/emx/myjar.jar MyPackage.MyClass "parameter1 = value1 '...

Another way is to use OSLineToken, invoke a perl, a treatment and then call java. Below the example helps you understand what I mean by that.
use strict;
Use File::Basename;

require 'semd_common.pl ';

my $directory = dirname($0);
chomp ($Directory);
My $classpath;
My $oracleHome = $ENV {"ORACLE_HOME"};
my $java;
my $error;

My $platform = get_osType();
If ($platform eq 'WIN') {}
$java = "$oracleHome\\jdk\\bin\\java";
$classpath = "$directory\\axis.jar;$directory\\commons-discovery-0.2.jar;$directory\\commons-logging-1.0.4.jar;$directory\\jaxrpc.jar;$directory\\saaj.jar;$directory\\orawsdl.jar;$directory\\activation.jar;$directory\\mail.jar";
}
else {}
$java = ' $oracleHome/jdk/bin/java ".
$classpath = "$directory/axis.jar:$directory/commons-discovery-0.2.jar:$directory/commons-logging-1.0.4.jar:$directory/jaxrpc.jar:$directory/saaj.jar:$directory/orawsdl.jar:$directory/activation.jar:$directory/mail.jar";

}

If (System ("$java - classpath $classpath @ARGV"). = 0)
{

There is a third way - by using JavaWrapperFetchlet. I think that 10.2.0.5 agent has a new feature where classpath can be specified in the application descriptor (as one of the properties). Thus, for each metric collection - java process will not start. However, I do not know exactly if this feature made in 10.2.0.5 code or not. If you are interested in using this feature, I can check on this and let you know.

Kind regards
-Gaara

Tags: Enterprise Manager

Similar Questions

  • XML - rpc Server 2008

    I have two systems with two computers two and different operating systems.

    Computer sys 1 NI PXI (number?) Windows XP

    Sys 2 HP Dual Xeon processor, Server 2008

    I have the XML - RPC configuration on both Labview 2010, MAX 4.7.7 (I think) attempts to drive Agilent 33522 A Func Gen via USB

    Sys 1 works as expected 1. run INIT 2. run functs 3. close it works if performing operations locally or via XML - RPC

    Sys 2 works as expected when run locally, when the XML - RPC server is started it seems to wok if I DON'T close but can run INIT opening several times a new session every time. When close is executed the following INIT Gets an error. (I'm not near the machine now and do not have the error number)

    XML - RPC has difficulties running on Windows Server 2008? Suggestions?

    Well our support pages Windows Server 2003 LabVIEW and its modules should have all the features. This leads me to think that something on the Windows Server 2003 is interfering.

    I found a few other external links about this, but nothing to confirm how to fix it.

    http://www.Webhostingtalk.com/showthread.php?t=863330

    Did you make any progress? Could you post the real error code?

  • Consume a Web service using javax.microedition.xml.rpc.Operation

    Requirement. Consume a Web Service using native libraries of Blackberry.

    Target WebService: http://ws.cdyne.com/WeatherWS/Weather.asmx

    WebService of the operation: http://ws.cdyne.com/WeatherWS/Weather.asmx?op=GetCityWeatherByZIP

    Environment: Eclipse JDE 1.3.0 with BB SDK Enterprise Server BB 5.0.0

    First Guide of: http://blog.bayestech.com/?tag=blackberry

    1 Java Stub

    public interface IWeatherServiceZip
    {
        public String getWeatherServiceByZip(String zipCode) throws java.rmi.RemoteException;
    
    }
    

    2. Service Java class

    import java.rmi.RemoteException;
    import javax.microedition.xml.rpc.ComplexType;
    import javax.microedition.xml.rpc.Element;
    import javax.microedition.xml.rpc.Operation;
    import javax.microedition.xml.rpc.Type;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.JAXRPCException;
    
    import com.lm.bb.ws.interfaces.IWeatherServiceZip;
    
    /**
     * @author lmo0
     *
     */
    public class WeatherServiceZip implements IWeatherServiceZip, javax.xml.rpc.Stub
    {
        protected static final QName _qname_operation_GetCityWeatherByZIP = new QName("http://ws.cdyne.com/WeatherWS", "GetCityWeatherByZIP");
        protected static final QName _qname_GetCityWeatherByZIPResponse = new QName("http://ws.cdyne.com/WeatherWS", "GetCityWeatherByZIPResponse");
        protected static final QName _qname_GetCityWeatherByZIP = new QName("http://ws.cdyne.com/WeatherWS", "GetCityWeatherByZIP");
        protected static final Element _type_GetCityWeatherByZIP;
        protected static final Element _type_GetCityWeatherByZIPResponse;
    
        private String[] _propertyNames;
        private Object[] _propertyValues;
    
        public WeatherServiceZip()
        {
            _propertyNames = new String[]
            { ENDPOINT_ADDRESS_PROPERTY };
            _propertyValues = new Object[]
            { "http://ws.cdyne.com/WeatherWS/Weather.asmx" };
        }
    
        public void _setProperty(String name, Object value)
        {
            int size = _propertyNames.length;
            for (int i = 0; i < size; ++i)
            {
                if (_propertyNames[i].equals(name))
                {
                    _propertyValues[i] = value;
                    return;
                }
            }
            String[] newPropNames = new String[size + 1];
            System.arraycopy(_propertyNames, 0, newPropNames, 0, size);
            _propertyNames = newPropNames;
            Object[] newPropValues = new Object[size + 1];
            System.arraycopy(_propertyValues, 0, newPropValues, 0, size);
            _propertyValues = newPropValues;
    
            _propertyNames[size] = name;
            _propertyValues[size] = value;
        }
    
        public Object _getProperty(String name)
        {
            for (int i = 0; i < _propertyNames.length; ++i)
            {
                if (_propertyNames[i].equals(name))
                {
                    return _propertyValues[i];
                }
            }
            if (ENDPOINT_ADDRESS_PROPERTY.equals(name)
                    || USERNAME_PROPERTY.equals(name)
                    || PASSWORD_PROPERTY.equals(name))
            {
                return null;
            }
            if (SESSION_MAINTAIN_PROPERTY.equals(name))
            {
                return new Boolean(false);
            }
            throw new JAXRPCException("Stub does not recognize property: " + name);
        }
    
        protected void _prepOperation(Operation op)
        {
            for (int i = 0; i < _propertyNames.length; ++i)
            {
                op.setProperty(_propertyNames[i], _propertyValues[i].toString());
            }
        }
    
        public String getWeatherServiceByZip(String zipCode) throws RemoteException
        {
            Object inputObject[] = new Object[]
            { zipCode };
    
            Operation op = Operation.newInstance(_qname_operation_GetCityWeatherByZIP,    _type_GetCityWeatherByZIP, _type_GetCityWeatherByZIPResponse);
            _prepOperation(op);
            op.setProperty(Operation.SOAPACTION_URI_PROPERTY,"http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP");//SOAP Action
            Object resultObj;
            try
            {
            resultObj = op.invoke(inputObject);
            System.out.print(resultObj.toString());
            } catch (JAXRPCException e)
            {
            e.printStackTrace();
            Throwable cause = e.getLinkedCause();
            if (cause instanceof java.rmi.RemoteException)
            {
            throw (java.rmi.RemoteException) cause;
            }
            throw e;
            }
            return (String) ((Object[]) resultObj)[0];
        }
    
        static
        {
            _type_GetCityWeatherByZIPResponse = new Element(_qname_GetCityWeatherByZIPResponse,_complexType(new Element[]
                    { new Element(new QName("http://ws.cdyne.com/WeatherWS","GetCityWeatherByZIPResult"), Type.STRING, 0, 1, false) }), 1, 1,false);
            _type_GetCityWeatherByZIP = new Element(_qname_GetCityWeatherByZIP,_complexType(new Element[]
                    { new Element(new QName("http://ws.cdyne.com/WeatherWS","ZIP"), Type.STRING, 0, 1, false) }), 1, 1, false);
            }
    
        private static ComplexType _complexType(Element[] elements)
        {
            ComplexType result = new ComplexType();
            result.elements = elements;
            return result;
        }
    }
    

    3 problem

    There is no information about the exception that occurs when I try to debug my Application actually when you call the Web Service to:

    resultObj = op.invoke (inputObject);

    Any help.  If you have any other suggestions on how to consume a web service using BB. I don't want to use KSOAP2 because the source code is not updated more and prefer the native BB mode without using the 3rd party jars.

    Thank you

    How do you generate the stub class? Have you used Sun's Wireless Toolkit?

  • Service of XML - RPC is not available

    I am facing a problem where CF 8.01 will not start. the log shows the message "XML - RPC service is not available. This exception is usually caused by the failure to start service. Check the configuration of your server.

    I have this track in a corrupted file /lib/neo-xmlrpc.xml; the structures being generated when I consume a local web service are deformed. If I reset this file to its shape created when installing CF, CF will start.

    Here is an example of the damaged structure:

    < wddxPacket version =' 1.0 ' > < header / > < data > < table length = '3' > < struct type = 'coldfusion.server.ConfigMap' > < var name =' http:// 123.123.123.2 < char code = ' 0 to / > < char code = ' 0 to / > < char code = 0 'a' / > /common/verifyUser.cfc? wsdl' > < String > http:// 123.123.123.2 < char code = ' 0 to / > < char code = ' 0 to / > < char code = 0 'a' / > /common/verifyUser.cfc?wsdl < / string > < / var > < / struct > < struct type = 'coldfusion.server.ConfigMap' > < var name =' http:// 123.123.123.2 < char code = ' 0 to / > < char code = ' 0 to / > < char code = 0 'a' / > /common/verifyUser.cfc? wsdl' > < String > < / string > < / var > < / struct > < struct type = 'coldfusion.server.ConfigMap' > < var name =' http:// 123.123.123.2 < char code = ' 0 to / > < char code = ' 0 to / > < char code = 0 'a' / > /common/verifyUser.cfc? wsdl' > < String > < / string > < / var > < / struct > < / array > < / data > < / wddxPacket >

    Corruption is rampant on my installation of developer on a windows xp machine. If I run the same code on my standard server edition running on Windows Server, the structure for the same verifyUser web service looks like this:

    < name var =' http://123.123.123.1/common/verifyUser.cfc?wsdl ' > < channel > < / string > < / var >

    On both machines, I'm under CF version 8,0,1,195765 with chf8010003.jar of updates and hotfix hf801 - 1875.jar.

    Has anyone another considering elsewhere or have ideas on how to fix?

    D character 0 and 0 a refer to the 10th and 13th character in the ASCII table. This is the carriage return and linebreak. Looks like when you regeistered the webservice that you had an accidental linebreak in the middel of the URL or the webservice. Remove the webservice of the configuration and enter it again without line breaks.

  • XML - RPC * confused *.

    Hi guys,.

    "Sorry really bothing the community here with my ' ahm - I have no idea" questions. I just started a new job which involves a large number of technology issues, that I have not worked with before. So, I would appreciate the help.

    Currently, the marketing department of my company evaluates an email marketing tool. My Department must assess whether an implementation of their API in our website (so that the marketing department can run on site only) works well. And it's my job to do. I've never worked with webservices and other front. So, I did some reading. The way I understand it is that I can call the API through XML - RPC. But I'm a bit stuck now. For example, I found the following CFC:

    http://support.JournURL.com/users/admin/index.cfm?mode=article & entry = 362

    If I understand this right, this analysis CFML XML - RPC and vice versa. But what I would call the host of the API and the API methods.

    A colleague has briefly mentioned, it should be easy to call this API and its methods through a Web service. However, which confused me even more, as all the webservies I can find (on www.xmethods.com) seem to be very specific and non-generic, so that I could call any API out there. Such a generic webservice exist? It would be safe? (You see. "I'm certainly confused here.)

    Sorry, if this is absolutely stupid. I'm trying to hang in there - but it's a small step for you, but a big jump for me.

    Thanks for any help, advice, links, tutorials, etc.
    Adrian

    OK, I did the work. The documentation is somewhat, uh, sparse. If anyone needs help with this good cfs - give me a PM.

    Adrian

  • Video loading on 5310 MCU (via XML - RPC)

    Hello.

    I am trying to create a script for Nagios monitoring monitor the use of the video ports on my 5310 MCU (software version 4.4).

    I found an example of a perl using RPC::XML scipt and it works quiet well except for one thing: I have no video support.

    I used the "device.health.query" method, which should include a member named "videoLoad" (an allusion to Cisco TelePresence MCU API 2.10 Guide).

    I get a correct result of this method, but there are some missing members.

    Here is the result:

    rtcBatteryStatus

    Ok

    operationalStatus

    assets

    voltagesStatusWorst

    Ok

    fanStatusWorst

    Ok

    temperatureStatusWorst

    Ok

    temperatureStatus

    Ok

    mediaLoad

    1

    voltagesStatus

    Ok

    fanStatus

    Ok

    cpuLoad

    0

    rtcBatteryStatusWorst

    Ok

    There is no «videoLoad» Member

    Is that what I got wrong, or do I have to activate something on the MCU?

    Is there another way to get the load of the video of the MCU (such as SNMP or sth)?

    Kind regards

    Sven Lindeke

    HELLO Sven.  Thus, it seems that the platform of the 5300 series will not return these values as the old platforms.  VideoLoad and audioLoad return values have been deleted because they were reporting incorrect information from this platform works mixed audio and video DSP unlike older models of MCU.

    The only options I see here:

    (1) run a script to extract the status data > conferences page.
    (2) to invest in the conductor and request a conductor for audio and video ports in use.
    (3) account team push to drive above CDETS for call API to draw the status information > conferences page.
    (4) put in place a script to subscribe to and then listen to the events of feedback - see page 18 of the http://www.cisco.com/en/US/docs/telepresence/infrastructure/mcu/api_guide/MCU_API_2-10.pdf
    May be able to count participants join and leave this way maybe.

    I know that doesn't help you now, but only four methods I can recommend at this time.

    VR
    Patrick

  • Consume an XML API - RPC of vCO (no SOAP/REST)

    Someone at - it examples of use of an XML - RPC API?

    I am trying to automate an older version of RedHat satellite, before they put in place a REST API compatible.

    It is quite easy to write against her python code using the xmlrpclib, so an idea, that I've been playing is to encapsulate the Python scripts within a script task or action of the vCO. But I've never seen examples of using stdin / stdout /stderr of an external program, so there could be a lot of violin involved.

    The ideal solution would obviously be if there was a Python plugin for vCO, but alas, no such beast exists, it seems.

    Furthermore, a XML - RPC for JavaScript module should be a viable solution, but I guess I would need to load this library from outside the sandbox of vCO.

    I had a similar problem where I was trying to integrate with Shoemaker and I found a code that makes javascript xmlrpc. I reworked so that it uses e4x which ends up being the best way to treat of vCO and created actions to represent the available options.

    I end by using this code, but limited, testing that I did with it worked.

    I don't have an easy way to export / host a package for you, but this substance includes the parts needed to recreate what I've built. Let me know if you have any questions.

    https://gist.github.com/jbweber/11401647

  • Exception when using JAX - RPC

    Hi all!
    I'm developing a web service client for society (pearls running 4.3) BB devices. Got the file from the server (generated gSOAP) WSDL, generated high heels using Sun WTK s 2.5.1' wscompile, started the MDS Simulator, wrote a main program, an input screen (for input parameters) and an output screen (for results), began the JDE 4.3 debugger and obtained
    javax.xml.rpc.JAXRPCException - java.lang.StringIndexOutOfBoundsException: Index 0 > = 0
    from the line of calling the operation.

    Using NetBeans, I created then a midlet to Web Services client using the WSDL file which worked immediately. Taking the source (essentially generated) files and pushing them into the JDE gave the same exception as shown above.

    Someone at - he seen this before?

    TIA,
    Martin

    OK, so never mind...

    I've implemented my Web Service client using kSOAP.

  • How can I change the prefix to namespace for the JAX - RPC client request?

    I create a JAX - RPC client to call an RPC/encoded web service. The service has been generated in a program of ColdFusion and for some reason when the SOAP namespace prefix is anything but "soapenv" it returns text/html instead of text/xml. Currently, the client sends requests with the prefix "env" and I would like to change it to "soapenv".

    I've created a type of javax.xml.rpc.handler.GenericHandler and tried to follow up:

    @Override public boolean handleRequest(MessageContext p1) {

         SOAPMessage msg = ((SOAPMessageContext) p1).getMessage(); 


         try {

              SOAPPart part = msg.getSOAPPart();

              SOAPEnvelope envelope = part.getEnvelope(); 

              envelope.setPrefix("soapenv"); 

              msg.saveChanges(); 

         } catch(SOAPException ex) {

              // TODO

              return false;

         } 


         return true;

    }

    However, I get the following exception:

    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [UNIMPLEMENTED ] FaultActor [null] Detail [<detail><bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">java.lang.AssertionError: UNIMPLEMENTED

    at weblogic.xml.domimpl.NodeImpl.setPrefix(NodeImpl.java:173)

    at test.MyHandler.handleRequest(MyHandler.java:33)

    at weblogic.wsee.handler.JaxrpcHandlerChain.handleRequest(JaxrpcHandlerChain.java:58)

    at weblogic.wsee.ws.dispatch.server.JaxrpcChainHandler.handleRequest(JaxrpcChainHandler.java:102)

    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)

    at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:107)

    at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:132)

    at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)

    at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:341)

    at test.Approvedsuppliers_Wrap_Stub.echo(Approvedsuppliers_Wrap_Stub.java:31)

    at test.Approvedsuppliers_WrapPortClient.echo(Approvedsuppliers_WrapPortClient.java:130)

    at test.Approvedsuppliers_WrapPortClient.main(Approvedsuppliers_WrapPortClient.java:43)

    Is there a solution? I appreciate all the comments.

    Thank you, Bill

    What I ended up doing is converting the SOAP message to a string, replace the namespace prefix and convert it to a SOAP message.

    @Override
       public boolean handleRequest(MessageContext messageContext) {
          SOAPMessageContext soapMessageContext = (SOAPMessageContext) messageContext;
          SOAPMessage soapMessage = soapMessageContext.getMessage();
    
          String soapString = convertSOAPToString(soapMessage);
    
          soapString = soapString.replaceAll("env:", "soapenv:");
          soapString = soapString.replaceAll("xmlns:env", "xmlns:soapenv");
    
          SOAPMessage newSoapMessage = convertStringToSOAP(soapString);
    
          MimeHeaders mimeHeader = newSoapMessage.getMimeHeaders();
          mimeHeader.setHeader("SOAPAction", "");
    
          soapMessageContext.setMessage(newSoapMessage);
    
          return true;
       }
    
       private String convertSOAPToString(SOAPMessage soapMessage) {
          StringWriter stringWriter = null;
    
          try {
             stringWriter = new StringWriter();
             StreamResult streamResult = new StreamResult(stringWriter);
    
             TransformerFactory transformFactory = TransformerFactory.newInstance();
             Transformer transformer = transformFactory.newTransformer();
             transformer.transform(new DOMSource(soapMessage.getSOAPPart()), streamResult);
    
          } catch (TransformerException e) {
             throw new RuntimeException(e);
          } finally {
             close(stringWriter);
          }
    
          return stringWriter.toString();
       }
    
       private SOAPMessage convertStringToSOAP(String soapString) {
          SOAPMessage soapMessage = null;
          ByteArrayInputStream byteInputStream = null;
    
          try {
             MessageFactory msgFactory = MessageFactory.newInstance();
             soapMessage = msgFactory.createMessage();
             SOAPPart soapPart = soapMessage.getSOAPPart();
    
             // Load the SOAP text into a stream source
             byte[] buffer = soapString.getBytes();
             byteInputStream = new ByteArrayInputStream(buffer);
    
             StreamSource source = new StreamSource(byteInputStream);
    
             // Set contents of message
             soapPart.setContent(source);        
    
          } catch (SOAPException e) {
             throw new RuntimeException(e);
          } finally {
             close(byteInputStream);
          }   
    
          return soapMessage;
       }
    
       private void close(Closeable closeable) {
          if(closeable != null) {
             try {
                closeable.close();
             } catch (IOException e) {
                // TODO
             }
          }
       }
    
  • JDeveloper 10.1.3 JAX - RPC and JDeveloper 11g

    I'm working on a J2SE Aplicattion using Jdeveloper 10.1.3.
    In JDeveloper 10.1.3 JAX - RPC works fine but I need works with Jdeveloper 11 and I have two errors
    javax.xml.rpc.ServiceException: provider com.sun.xml.rpc.client.ServiceFactoryImpl not found
    or
    Jaxrpc 1.1 method is not supported.

    What can I do?

    Thank you

    Hello

    JDeveloper 11 doesn't support JAX - RPC 1.1.

    You can find here some migration steps:

    http://www.approach.nl/2009/01/migrating-Web-services-from-JDeveloper-10G-to-11g/

    I think that there is a Migration Guide from the Web Service available using JDeveloper 11.

    You really just have to redefine the service interfaces, if you try to run the proxy generated with 10g, you will probably need to regenerate them.

    Hope this helps

  • org.xml.sax.SAXException:SimpleDeserializer met a child element...

    Hi all

    I created a following program using the 'GetReportDefintion' method provided by BI Publisher Web Services
    package bip_webservices;
    import com.oracle.xmlns.oxp.service.PublicReportService.ItemData;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportResponse;
    import com.oracle.xmlns.oxp.service.PublicReportService.ParamNameValue;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportDefinition;
    import com.oracle.xmlns.oxp.service.PublicReportService.ScheduleRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.DeliveryRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.EMailDeliveryOption;
    
    import  java.io.FileOutputStream;
    import  java.io.OutputStream;
    import java.net.MalformedURLException;
    import java.rmi.RemoteException;
    import  java.util.Calendar;
    import javax.xml.rpc.ServiceException;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import org.apache.axis.encoding.ser.BeanDeserializerFactory;
    import org.apache.axis.encoding.ser.BeanSerializerFactory;
    import  javax.xml.namespace.QName;
    import  javax.xml.rpc.ParameterMode;
    import  java.net.URL;
    
    
    public class BIP_GetReportDefinition {
        
        public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException{
         try{
            final String bipEndpoint = "http://localhost:9704/xmlpserver/services/PublicReportService?wsdl";
            final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
            final String xdofile = "/MyReports/SummaryCustomerReport/SummaryCustomerReport.xdo";
          
            Service service = new Service();
            Call call = (Call) service.createCall();
            call.setTargetEndpointAddress(new URL(bipEndpoint));
     
           System.out.println("BEGIN TESTING getReportDefinition");
     
            // register the ReportDefinition class
            QName reportDef = new QName(bipNamespace, "ReportDefinition");
            call.registerTypeMapping(ReportDefinition.class, reportDef,
                            BeanSerializerFactory.class, BeanDeserializerFactory.class);
          
     
            // register the ParamNameValue class
            QName nmvals = new QName(bipNamespace, "ParamNameValue");
            call.registerTypeMapping(ParamNameValue.class, nmvals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
     
            call.setOperationName(new QName(bipNamespace, "getReportDefinition"));
            call.addParameter("reportAbsolutePath", XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
            call.setReturnClass(ReportDefinition.class);
     
            // issue the request
            ReportDefinition reportDefn = (ReportDefinition) call.invoke(
                new Object[] { xdofile, "Administrator", "Administrator"});
     
            System.out.println("Report Definition Returns with \n Default Output Format = " + reportDefn.getDefaultOutputFormat());
            ParamNameValue params [] = reportDefn.getReportParameterNameValues();
     
            if (params != null) {
                for (int i = 0; i < params.length; i++) {
                    System.out.print("Parameter " + params.getName() + ":");
    if (params[i].getValues() != null) {
    for (int j = 0; j < params[i].getValues().length; j++)
    System.out.print(" " + params[i].getValues()[j]);
    } else
    System.out.print(" null");
    System.out.println(" - multiple values? " + params[i].isMultiValuesAllowed());
    }
    }
    System.out.println("END TESTING getReportDefinition");
    }catch(Exception e){
    e.printStackTrace();
    }
    }
    }


    I am getting following exception message. Anyone has any ideas what could be the mistake ?
    SEVERE: Exception:
    org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    AxisFault
     faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
     faultSubcode: 
     faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
     faultActor: 
     faultNode: 
     faultDetail: 
            {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    
            {http://xml.apache.org/axis/}hostname:mildh0228
    
    org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
            at org.apache.axis.client.Call.invoke(Call.java:2470)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            ... 3 more
    Thank you for giving this problem at a glance.
    -Sookie

    Hello Sookie,

    I found the problem, it is with two or three child settings are not saved the deserializer. There are two or three extra classes must be registerd.

    Register the TemplateLabelValue class
    QName templateval = new QName (bipNamespace, "TemplateFormatLabelValue");
    Class cls = TemplateFormatLabelValue.class;
    call.registerTypeMapping (cls, templateval, BeanSerializerFactory.class, BeanDeserializerFactory.class);

    Register the TemplateLabelValues class
    QName templatevals = new QName (bipNamespace, "TemplateFormatsLabelValues");
    CLS = TemplateFormatsLabelValues.class;
    call.registerTypeMapping (cls, templatevals, BeanSerializerFactory.class, BeanDeserializerFactory.class);

    Could you please give it a try?

    Thank you.
    Yang

  • Modification of the Module dependency entries in the generated file to COD

    Hi all

    I am trying to build a blackberry application that uses web services. I use my own implementation of web service client because most of the mobile does not support RPC or JSR 172. So I do not use net_rim_jaxrpc blackberry module. I tried to deploy the application in 8130 (Verizon) Pearl and Curve 8320 (T-Mobile). It works very well in Pearl but he launched 'Net_rim_jaxrpc Module could not be found' error in curve 8320. I looked for versions of software to both phones. Pearl has a version 4.3 and curve has a version 4.2. I know that version 4.2 doesn't have a net_rim_jaxrpc module, then it throws the error message. I looked in the JAD file and it has an entry for net_rim_jaxrpc in "RIM-COD-Module-dependencies. My question is, since I do not use net_rim_jaxrpc API why he puts this entry in the JAD. I even tried to delete this entry from the JAD but curve 8320 always up the error message. If its configuration "RIM-COD-Module-dependencies" in another place in the COD file. If under its weight so why is - do this so that even when I'm not using the API. And how to remove this entry for dependence. I use eclipse 3.2 for development.

    Someone please help me on this.

    Thank you

    Gopi

    The problem is resolved. Problem is not with the development version. Problem is with the import statement. There was an import for 'javax.xml.rpc.Stub' statement, and I don't notice it. But when I changed the JDE 4.2 development, he began to show an error message for the unknown variable in the IDE. I changed the import to my own Stub class and everything seems to work very well.

    Thank you for everything that you guys!

    I have another question. I have a custom button and clicking on it opens the BB browser. On the development, I need the button to look like a hypertext link with the symbol of the hyperlink (a symbol of the hand). Can anyone suggest me something on this? I have to do something in the drawFocus or onFocus the custom button?

    Thank you

    Gopi

  • I'm illegalStateException

    I try to extract the contents of an xml using the code below but it opens the screen at first, then gets a wen illegalstateException that he tries to get the XML

    Please advice

    package main45;

    Import artistapp.main.TextBitmapManager;

    import java.io.IOException;
    import java.io.InputStream;
    Import javax.microedition.io.Connector;
    Import javax.microedition.io.HttpConnection;
    Import javax.microedition.xml.rpc.Element;

    to import org.W3C.DOM.document;
    Import org.w3c.dom.Node;
    Import org.w3c.dom.NodeList;
    Import org.xml.sax.SAXException;

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.component.LabelField;
    Import net.rim.device.api.ui.component.RichTextField;
    Import net.rim.device.api.ui.component.SeparatorField;
    Import net.rim.device.api.ui.container.HorizontalFieldManager;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.xml.parsers.DocumentBuilder;
    Import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
    Import net.rim.device.api.xml.parsers.ParserConfigurationException;

    public class airmainscreen extends screen implements {FieldChangeListener}

    Private AboutButtonField aboutbutton;
    Private EventsButtonField eventbutton;
    Private VideoButtonField videobutton;
    Private UpdatesButtonField updatesbutton;
     
     
    connection of load
    HttpConnection hc = null;
    Element = null;
    Gross StringBuffer = new StringBuffer();
    String temp;
    String rd;
    Channel file;
    Paper chain;
    String lenx;
    String parentName;
     
    public AirMainScreen() {}
    TODO auto-generated constructor stub
    Bitmap bm = Bitmap.getBitmapResource("images/icons/video.png");
      
    Lf channel = "ally Lilly |" Bio;
    TextBitmapManager hm = new TextBitmapManager (lf, WB);
    setTitle (hm);
      
      
      
    buttons
    HorizontalFieldManager hmanager = new HorizontalFieldManager();
    aboutbutton = new AboutButtonField ("About", 0);
    aboutbutton.setChangeListener (this);
    hmanager. Add (aboutbutton);
      
    videobutton = new VideoButtonField("Video",0);
    videobutton.setChangeListener (this);
    hmanager. Add (videobutton);

    eventbutton = new EventsButtonField("Events",0);
    eventbutton.setChangeListener (this);
    hmanager. Add (eventbutton);
      
    updatesbutton = new UpdatesButtonField("Updates",0);
    updatesbutton.setChangeListener (this);
    hmanager. Add (updatesbutton);
      
      
      
    Add to the center manager
    CenterManager cmanager2 = new CenterManager();
    cmanager2.setbackground (BackgroundFactory.createLinearGradientBackground (0x9966FF, 0x9999CC, 0x9966FF, 0x9999CC));
      
    cmanager2. Add (hmanager);
    Add (cmanager2);
      
    Add (new SeparatorField());
      
    Thread t = new HttpFeed();
    t.Start ();
      
      
    }
     
     
     
    void displayNode (node node, int depth)
    {
    {if(node==null)}
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}

    public void run() {}
    TODO self-generating method stub
    Dialog.Alert ('no');
    }
        
    });

    }
      
      
    If (node.getNodeType () is Node.ELEMENT_NODE)
    {
    StringBuffer buffer = new StringBuffer();
    indentStringBuffer (buffer, depth);
    NodeList childNodes = node.getChildNodes ();
    int numChildren = childNodes.getLength ();
    FirstChild node = childNodes.item (0);
     
    If the node has only one child and that child is a text node, it is
    the form of text, so print '= 'Text' element'.
       
    If (numChildren == 1 & firstChild.getNodeType () == Node.TEXT_NODE)
    {
         
       
    buffer. Append (firstChild.getNodeValue ());
    buffer. Append ("\n");
    Add (new RichListFieldx (buffer.toString (), 0));
    Add (new SeparatorField());
       
    }
    on the other
    {
      
    parentName = node.getNodeName ();
     
    for (int i = 0; i)< numchildren;="" ++i="">
    {
    displayNode (childNodes.item (i), depth + 1);
    }
    }
    }
    on the other
    {
     
    String nodeValue = node.getNodeValue ();
    If (nodeValue.trim () .length ()! = 0)
    {
    StringBuffer buffer = new StringBuffer();
    indentStringBuffer (buffer, depth);
    buffer. Append (' "") .append (nodeValue) .append ("'");
    Add (new RichTextField (buffer.toString ()));
    }
    }
    }

    ' Public Sub fieldChanged (field field, int context) {}
    TODO self-generating method stub
     
      
    }

    class HttpFeed extends Thread {}

    HttpConnection hc = null;
    InputStream is;
    RootElement element;
    Document document = null;
     
    public HttpFeed() {}
    TODO auto-generated constructor stub
    }
     
     
    public void run() {}
    try {}
    HC = (HttpConnection), Connector.open ("path-to-xml");
    hc.setRequestMethod (HttpConnection.GET);
    hc.setRequestProperty ("Content-Type", "plain of //text");
    Final InputStream is = hc.openInputStream ();
    final int len = (int) hc.getLength ();
    mutable int ok = hc.getResponseCode ();
    final String rm = hc.getType ();
      
     
      
    Unwrap the xml
    DocumentBuilderFactory plant = DocumentBuilderFactory.newInstance ();
    DocumentBuilder builder = null;
    try {}
    Builder = factory.newDocumentBuilder ();
    } catch (ParserConfigurationException e) {}
    Generative TODO catch block
    e.printStackTrace ();
    }
    HC = (HttpConnection) Connector.open (url + "; deviceside = true");
    hc.setRequestMethod (HttpConnection.GET);
    InputStream inputStream = hc.openInputStream ();
    file = hc.getFile ();
    try {}
    Document document = builder.parse (is);
    LenX = document. GetElementsByTagName ("to"). Item (0) .getChildNodes (). Item (0) .getNodeValue ();

    org. W3C. DOM. Element rootElement = document.getDocumentElement ();
    rootElement.normalize ();
    Generative TODO catch block
        
            
    displayNode (rootElement, 0);

    } catch (SAXException e) {}
    Generative TODO catch block
    e.printStackTrace ();
    }
    HC. Close();
    is. Close();

    } catch {} (final IOException e1)
    Generative TODO catch block
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run()
    {
    Dialog.Inform (E1.getMessage ());
    System.out.Print (E1.getMessage ());
    }

    });
      
    }
     
     
    }
       
     
     
    }

    }

    It is useful to use the Debug lines like the following. :

    try {}

    } catch (Throwable t) {}

    Code that could be a mistake

    t.printStackTrace ().

    System.out.println ("Exception" + t.toString ());

    {

    This will tell you what really is the Exception.

    In this case, I am convinced, that it is because you are trying to update the User Interface of a Thread that is not the thread of events.  It is a common problem, and there are discussions in this forum dealing with this.  I suggest rather than repeat myself this information, looking around.  There is also a video that addresses the event Thread I think, you might find useful.

  • How to use the getter class set extends thread?

    package mypackage;
    
    import java.io.ByteArrayInputStream;
    import java.io.InputStream;
    
    import javax.microedition.io.HttpConnection;
    import javax.microedition.xml.rpc.Element;
    
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    
    import net.rim.device.api.io.messaging.UsernamePasswordCredentials;
    import net.rim.device.api.io.transport.ConnectionFactory;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.RichTextField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.xml.parsers.DocumentBuilder;
    import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
    
    public class search extends Thread{
    private MainScreen scren;
    
    String nul = "";
    MyScreen a = new MyScreen();
    
        public void run() {// define variables later used for parsing
            System.out.println("MASUK SEARCH!!!");
            String url = "http://localhost/ms/password.xml";
            Document doc = null;
            HttpConnection conn = null;
            try{
    
                //providing the location of the XML file,
                //your address might be different
                conn=(HttpConnection) new ConnectionFactory().getConnection(url).getConnection();
                System.out.println(conn.toString());
                conn.setRequestProperty("User-Agent",
                "Profile/MIDP-1.0 Confirguration/CLDC-1.0");
                conn.setRequestMethod(HttpConnection.GET);
                //next few lines creates variables to open a
                //stream, parse it, collect XML data and
                //extract the data which is required.
                //In this case they are elements,
                //node and the values of an element
                if(conn.getResponseCode()== HttpConnection.HTTP_OK){
                DocumentBuilderFactory docBuilderFactory= DocumentBuilderFactory. newInstance();
                System.out.println("masuk Sini");
    
                InputStream inputStream = conn.openInputStream();
    
                byte[] data = new byte[256];
                int len = 0;
                int size =0;
                StringBuffer raw = new StringBuffer();
                while(-1 !=(len =inputStream.read(data))){
                    raw.append(new String(data,0,len));
                    size +=len;
                }
                String content = raw.toString();
                InputStream input = new ByteArrayInputStream(content.getBytes());
    
                DocumentBuilder docBuilder= docBuilderFactory.newDocumentBuilder();
                docBuilder.isValidating();
                System.out.println("dan sini");
                docBuilderFactory.setIgnoringElementContentWhitespace(true);
    
    //            Element root= doc.getDocumentElement();
    //            System.out.println(root.toString());
    //
    //            Element operation = (Element) root.getOwnerDocument();
    //            System.out.println(operation.toString());
    //            String layer = operation.getAttribute("Category");
    //            System.out.println(layer);
    //            root.normalize();
                System.out.println("terakhir");
    
    //            System.out.println("Category:"+layer);
                doc = docBuilder.parse(input);
                doc.getDocumentElement().normalize();
                NodeList list=doc.getElementsByTagName("password");
           System.out.println("Atleast!");
    
               String _node=new String();
               String  _element = new String();
                //this "for" loop is used to parse through the
                //XML document and extract all elements and their
                //value, so they can be displayed on the device
    
                for (int i=0;i
    

    Sorry for my bad English

    This is my code

    I want to pass the string, which is _Node I get it to XML parsing, to another class.

    can I get the string? Thank you

    already fact-_-

    user OOP

  • Web Service JAXRPCExceptions

    I worked with happiness on an application that accesses some .net web services with relatively few problems until a few days ago, when my Blackberry started getting:

    javax.xml.rpc.JAXRPCException: java.lang.NullPointerExceptions every time he tried to access any web service.

    This only happens on my BB, works very well in the Simulator, and works very well on another BB people there must be something specific to my camera (8330). I have recorded myself on the network, from my battery, even reloaded a backup from a day before what is going on has begun.

    I'm puzzled how to solve. As it works in the Simulator, all that I can say with certainty is that the error occurs in the code generated by the program generation of java stub on the line, he tries to call the web service. I don't see how it can be a code problem but since nothing has changed and it works on other devices.

    Does anyone have a suggestion on what might be suddenly set up wrong on my BB who worked for weeks before that?

    Thank you

    Never understand what was wrong. Finally, I wiped my BB using the option in the parameters of security, restored from a backup, and the problem is now gone. I hate not knowing, but at least I can run my app again.

Maybe you are looking for

  • What is the maximum memory card SD that I can use my C open ZTE?

    After a bit of reading on the SD for the ZTE Open C (Firefox OS) maps I've gathered that the card must be formatted FAT32. This means that there is no reason for me using a card with capacity > 32 GB? I was thinking of doing a 64 GB class 10 card, bu

  • 15 - ac121dx: laptop bios password

    the laptop was stolen and when the police recovered it it has a bios password on this subject. I looked around to see if I can remove it and came up empty.  I have the code after 3 attempts to code 58916864. can you please help.

  • HPE180T CTO: HPE 180 t graphics card advise?

    Recently, I improved my diet at 650W, installed a 660Ti GTX card and had nothing but problems. I did everything as suggested here and elsewhere. I updated the Bios, used DDU, reformatted and reinstalled my OS. Tried on older drivers, the most recent,

  • test drive has failed-303

    I have a laptop HP 15 months and longer warranty. It evokes the launch repair mode or start windows normally option and the two options just hang there even after their execution for nearly 5 hours. When I run diagnostics using F10 it fails with ' di

  • Required for controller ethernet and FN - keys to the A100 Satellite drivers XP

    Hello.After Reinstalling windows xp, I found almost all of the drivers, I need on this site.But I have a camera more... Ethernet controller. first problem is that there are installed to device:Network adapter 1394Intel Pro/wireless 3945ABG Network Co