[Solved]{scheme} Error: (/) bad argument type: # unspecified

I'm working through Structure and Interpretation of Computer Programs, and I've run into some behaviour I don't understand.
The code:
(define (average x y)
(/ (+ x y) 2))
(define (refine r g)
(print "["r"]["g"]")
(average (/ r g) g))
(define (sqrt-guess rad guess)
(define oldguess guess)
(define guess (refine rad guess)) # problem line
(if (= oldguess guess)
guess
(sqrt-guess rad guess)))
It seems that when refine is called in the problem line the second argument is not being 'received' as I would expect.
#;1> (sqrt-guess 9 1)
[9][#<unspecified>]
Error: (/) bad argument type: #<unspecified>
Call history:
<syntax> (sqrt-guess 9 1)
<eval> (sqrt-guess 9 1)
<eval> [sqrt-guess] (refine r g)
<eval> [refine] (print "[" r "][" g "]")
<eval> [refine] (average (/ r g) g)
<eval> [refine] (/ r g) <--
I tried (define guess (refine rad oldguess)), same outcome. At this point, I figure it's some consequence of applicative-order processing that I don't understand. But things got more interesting when I added a standalone call to refine:
(define (sqrt-guess rad guess)
(define oldguess guess)
(refine rad oldguess) # new line
(define guess (refine rad oldguess)) # (define guess (refine rad guess)) also works
(if (= oldguess guess)
guess
(sqrt-guess rad guess)))
Now the code runs as expected and returns an answer. However, if I change "oldguess" to "guess" in the first refine line:
(define (sqrt-guess rad guess)
(define oldguess guess)
(refine rad guess)
(define guess (refine rad oldguess)) # (define guess (refine rad guess)) also fails
(if (= oldguess guess)
guess
(sqrt-guess rad guess)))
the original error re-occurrs. In every case the 'standalone' call to refine gets both arguments as expected; it's the one in "define guess" that has issues.
I'm not looking for help fixing the code, but for an explanation/breakdown of what's going on. Thanks.
Last edited by alphaniner (2013-06-20 13:20:34)

I believe that redefining 'guess' is confusing the compiler.
You're right. That was my first thought too, but I swear I tried something like (define foo (refine rad guess)) which didn't work either. I just tried it again and it works just fine.
I haven't been introduced to let yet, and the way it's parenthesized I don't really understand how it works. I think of let in bash terms (ie. let x++) so maybe that's my problem. Anyway, I'll wait 'till I come across it in the text.
Using your suggestions I got it to work using only stuff I know:
(define (sqrt-guess rad guess)
(define newguess (refine rad guess))
(if (= newguess guess)
guess
(sqrt-guess rad newguess)))
Definitely cleaner. Thanks!

Similar Messages

  • Help! LR4.2 Anyone else getting Heal tool errors? error bad argument #1 to 'ipairs'

    I have been doing lots of healing on a shoot tonight and all of a sudden, I started getting an error every time I click with the heal tool. It also appears, that some of my past heals, are not being saved.
    Any ideas of what I should do?
    Thanks!

    'IPAIRS' -Bad argument #1 ERROR UPDATE...
    I originally posted here on 11/23 and after lots of long conversations with the good folks at Adobe and being "bumped up" to higher level tech support there is good news and bad news and I'm not really sure which is which :-)
    The higher level tech support guy logged onto my computer, watched what I did (new catalog, safe mode, new admin file, 2 of adobe's images) and, after watching me, was able to recreate the error on his machine. I guess that's the bad news because the problem is now, clearly, not a bug that is in each of our hardware. Rather the bug is, as we were all figuring, in the program. It seems that the create web collection or create print collection or create slideshow collection, either on Mac or Windows, all give the same ipairs error.
    (Oh, the good news is that means that I don't have to reinstall my OS).
    Tech support's plan is to take this info to other people and at some point they'll decide whether to create a fix for the problem in the next, or later down the road, version of the program.
    I'm told that the best way for the fix to end up happening is for EVERYONE who is having this problem to go to www.adobe.com and file feedback or a bug report. Squeaky wheels get the oil, as they say.
    Stephanie

  • [SOLVED] gpgme error: Bad file descriptor

    I tried to install a new system today. I chrooted into it and wanted to install some packages, but all I got was this error instead:
    error: GPGME Error: bad file descriptor
    error: <package>: missing required signature
    And that for each and every single package...
    I ran pacman-key --init and --populate, set SigLevel to Optional in pacman.conf, did pacman -Syu and all you want, still got the same error.
    Last edited by DeatzoSeol (2012-06-17 22:55:10)

    ... which I have. Still the same.
    OMG! I re-checked and found out there's no procfs in my chroot. Damn me it works now... what did I learn today? double-check your chroot.
    Thanks
    Last edited by DeatzoSeol (2012-06-17 22:55:46)

  • Unable to launch application from my machine:Bad MIME Type

    Hi,
    The following error message was printed when I tried to access the SwingSet2 demo from the Java Web Start site.
    An error occurred while launching/running the application.
    Title: SwingSet2
    Vendor: Sun Microsystems, Inc.
    Category: Download Error
    Bad MIME type returned from server when accessing resource: http://java.sun.com/products/javawebstart/apps/SwingSet2.jnlp - text/html
    Can you please suggest what is to be done to rectufy this problem?
    Regards,
    Satish

    Bad MIME type returned from server when accessing
    resource:
    http://java.sun.com/products/javawebstart/apps/SwingSet
    .jnlp - text/htmlit should return application/x-java-jnlp-file.
    My guess is that you use proxy which messes up headers.
    Otherwise try to reinstall Web Start, then enable the console and log output in Web Start's advanced preferences to get more clues what's going on.
    Regards,
    Marc

  • "Bad CPU Type In Executable"

    After upgrading from an eMac to an Intel Mac Mini, I noticed that I needed to reinstall Xcode. Once I reinstalled Xcode (v2.4), I made some changes to one of my applications. After testing it fully on my new Mac, I copied the .app file to my old eMac and attempted to re-run. In doing so, I received the following error message:
    "You cannot open the application 'NAME OF APPLICATION' because it may be damaged or incomplete."
    So, in Terminal, I navigated through the Package Contents to the actual executable and tried to run it. I, then, received the following error:
    "Bad CPU type in executable."
    How do I correct this error, so it will run on both of my Macs??
    THANKS IN ADVANCE!!
    WBELL
    eMac Specs:
    1GHz, 768MB DDR, OSX 10.4.x
    Mini Specs:
    1.5GHz Core Solo, 1024MB DDR2, OSX 10.4.x
    Mac Mini Mac OS X (10.4.7) 1.5GHz Core Solo

    Here are a couple of things to check...
    First, from your screen shot it appears that the main.m file is from an older AS Studio application (ie is this a project that was originally created some time ago... perhaps under Project Builder?). The main.m file that gets included with relatively new AS Stdio apps looks like this:
    <pre>
    extern void ASKInitialize();
    extern int NSApplicationMain(int argc, const char *argv[]);
    int main(int argc, const char *argv[])
    ASKInitialize();
    return NSApplicationMain(argc, argv);
    </pre>
    So you may want to copy/paste the main.m code from a newly created AS Studio app into your (older?) existing project. I'm not sure the above problem would cause the failure to build a Universal app, but changing code in main.m may get rid of the warnings you're seeing.
    But also, the screenshot made me wonder if your target(s) needs to be converted to the newer "native" target format (this is different from the "conversion" that Xcode does to an older project file). With your project open click on Xcode's "Project" menu... is the option "Upgrade 'YourTargetName' to Native Target" or "Upgrade all Targets in Project to Native" available? If so, I think you must convert to native targets in order to build universal binaries.
    Hope this helps,
    Steve

  • Bad argument openProject when running SaveAsProjectTemplate.jsx

    Hi
    I have created a RoboHelp 8 project template and rolled it out to the team for use in an upcoming project.
    Six authors have been able to load the project then, using the Script Explorer, have run the SaveAsProjectTemplate.jsx script to make it a project template. One author has attempted to run this script and been confronted with the error Bad argument openProject once they accepted the default location.
    The installation process was identical for all seven machines, it activated/registered without a hitch and all available updates have been run on the seven machines (we are all on 8.0.2.208).
    Does anybody know, please, why this error might be occuring on just one machine?
    Many thanks
    Nigel

    Hi Nigel and welcome to the RH forums. Things to try include:
    Running one of the pre-installed scripts (e.g. Word Count).
    Reinstalling the Extend Script add on.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • Bad index type for collection access ???

    Hi there,
    I am writing a script in VBA to connect to SAP.
    I encountered something strange.
    Why does this work:
    Set oSession = oConnection.Children(0)
    But this isn't:
    X = 0
    Set oSession = oConnection.Children(X)
    It results in an error: "Bad index type for collection access"
    Regards, Bas Prins

    Thanks,
    Although that is not proper VBA syntax I understand your suggestion.
    In VBA that would be:
    DIM X AS INTEGER
    X = 0
    Set oSession = oConnection.Children(X)
    But I tried several datatypes, all resulted in error.
    Regards, Bas.

  • ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], []

    Hi,
    Can anyone tell me how to resolve this error
    ORA-00600: internal error code, arguments: [ktbdchk1: bad dscn], [], [], [], [], [], [], []
    ORA-06512: at "ProcName", line 7
    ORA-06512: at line 17
    thx

    Most of this type of errors (ORA-600) you need report to Oracle Support or check the metalink for released fix or possible workaround.
    Anyway this error is fixed in:
    10.1.0.4 patchset
    9.2.0.7 patchset (released for Windows only, for other platforms expecting soon)
    10gR2 (not released yet)

  • Error deserializing arguments, xml tag without a recognized type

    I am trying to run a webservice created using Weblogic Workshop 8.1sp2 that communicates
    with an ejb control. When I test in debug mode, I get the above error, specifically:
    <detail>
    <jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">
    com.bea.wlw.runtime.core.request.RequestValidationException: Error deserializing
    arguments.
    Encountered an xml tag without a recognized type: the type must be declared with
    an xsi:type attribute.
    Caused by: com.bea.xml.marshal.XmlEncodingException: Encountered an xml tag with
    out a recognized type: the type must be declared with an xsi:type attribute.
    </detail>
    I am passing a Request object to the jws method (to the ejb) that has a Collection
    as an instance member. This Collection references objects of another type, Param
    (code for both objects below). Before passing the object, I convert the Collection
    to an array of objects. When I call the operation via a java client, I get the
    above message.
    In Workshop, I've included the Request and Param classes as the parameter xml
    and the soap style is rpc. I've tested the ejb by itself and it is working fine.
    Request.java:
    import java.util.*;
    public class Request implements java.io.Serializable
    protected Collection params=null;
    public Collection getParams()
    { return params; }
    public void setParams(Collection data)
    { params=data; }
    Param.java:
    public class Param implements java.io.Serializable
    private String name=null;
    private Object value=null;
    public String getName()
    { return name; }
    public void setName(String data)
    { name = data; }
    public Object getValue()
    { return value; }
    public void setValue(Object data)
    { value=data; }
    Here's the code from the jws:
    public class MyWS implements com.bea.jws.WebService
    * @common:control
    private control.PSEjbControl psEJB;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:parameter-xml
    * include-java-types="mypackage.Request mypackage.Param"
    * @jws:protocol soap-style="rpc"
    public void addData(mypackage.Request arg0) throws java.rmi.RemoteException
    System.out.println("arg0 : " + arg0);
    psEJB.addData(arg0);
    *Note: in the server console, arg0 comes through as null when called from my client.
    Here's the bit from my client:
    import weblogic.jws.proxies.*;
    import org.openuri.www.encodedTypes.Request;
    import org.openuri.www.encodedTypes.Param;
    public void go(String wsdl) throws Exception {
    MyWSSoap mw = null;
    mw = new MyWS_Impl().getMyWSSoap();
    Request req = new Request();
    Collection reqColl = new ArrayList();
    Param param1 = new Param();
    param1.setName("NAME");
    param1.setValue("Joe Tester");
    Param param2 = new Param();
    param2.setName("ADDRESS");
    param2.setValue("345 Test Drive");
    reqColl.add(param1);
    reqColl.add(param2);
    Object[] obs = reqColl.toArray();
    req.setParams(obs);
    mw.addData(req);
    Not sure if this enough to go by. Please let me know if you need more information.
    Any help is really appreciated. Thanks.

    Hi Keith,
    My only suggestion is to factor out the java.util.Collection (see the
    docs here [1]) with either primitive types or XMLBeans [2].
    Sorry, not much help. You might also ask your question in the workshop
    [3] newsgroup.
    Bruce
    [1]
    http://e-docs.bea.com/workshop/docs81/doc/en/integration/reference/refJavaClassConversion.html
    [2]
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/xmlbeans/conXMLBeansSupportBuiltInSchemaTypes.html
    [3]
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.workshop
    Keith wrote:
    >
    Hi Bruce, thanks for the reply. I set the operation for document-style soap and
    still get the deserialization exception as mentioned in my original note. Below
    is the wsdl. Note: in my original note, the problematic operation was addData()
    which is now named addBusinessLocation(). As always, your help is greatly appreciated.
    Keith
    <?xml version="1.0" encoding="utf-8"?>
    <!-- @editor-info:link autogen="true" source="PublicServiceWS.jws" -->
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/"
    xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    targetNamespace="http://www.openuri.org/">
    <types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://www.openuri.org/"
    xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:ope="http://www.openuri.org/">
    <s:element name="addBusinessLocation">
    <s:complexType>
    <s:sequence>
    <s:element name="arg0" type="ope:Request" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="addBusinessLocationResponse">
    <s:complexType>
    <s:sequence/>
    </s:complexType>
    </s:element>
    <s:element name="getBusinessLocation">
    <s:complexType>
    <s:sequence/>
    </s:complexType>
    </s:element>
    <s:element name="getBusinessLocationResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="getBusinessLocationResult" type="ope:Response" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="Response" nillable="true" type="ope:Response"/>
    <s:element name="repeat">
    <s:complexType>
    <s:sequence>
    <s:element name="in" type="s:string" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="repeatResponse">
    <s:complexType>
    <s:sequence>
    <s:element name="repeatResult" type="s:string" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    </s:element>
    <s:element name="string" nillable="true" type="s:string"/>
    <s:complexType name="Request">
    <s:sequence>
    <s:element name="Params" type="ope:Collection" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    <s:complexType name="Collection">
    <s:sequence>
    <s:element name="item" type="s:anyType" nillable="true" minOccurs="0"
    maxOccurs="unbounded"/>
    </s:sequence>
    </s:complexType>
    <s:complexType name="Param">
    <s:sequence>
    <s:element name="Name" type="s:string" minOccurs="0"/>
    <s:element name="Value" type="s:anyType" minOccurs="0"/>
    </s:sequence>
    </s:complexType>
    <s:complexType name="Response">
    <s:complexContent>
    <s:extension base="ope:Request">
    <s:sequence/>
    </s:extension>
    </s:complexContent>
    </s:complexType>
    </s:schema>
    </types>
    <message name="addBusinessLocationSoapIn">
    <part name="parameters" element="s0:addBusinessLocation"/>
    </message>
    <message name="addBusinessLocationSoapOut">
    <part name="parameters" element="s0:addBusinessLocationResponse"/>
    </message>
    <message name="getBusinessLocationSoapIn">
    <part name="parameters" element="s0:getBusinessLocation"/>
    </message>
    <message name="getBusinessLocationSoapOut">
    <part name="parameters" element="s0:getBusinessLocationResponse"/>
    </message>
    <message name="repeatSoapIn">
    <part name="parameters" element="s0:repeat"/>
    </message>
    <message name="repeatSoapOut">
    <part name="parameters" element="s0:repeatResponse"/>
    </message>
    <message name="getBusinessLocationHttpGetIn"/>
    <message name="getBusinessLocationHttpGetOut">
    <part name="Body" element="s0:Response"/>
    </message>
    <message name="repeatHttpGetIn">
    <part name="in" type="s:string"/>
    </message>
    <message name="repeatHttpGetOut">
    <part name="Body" element="s0:string"/>
    </message>
    <message name="getBusinessLocationHttpPostIn"/>
    <message name="getBusinessLocationHttpPostOut">
    <part name="Body" element="s0:Response"/>
    </message>
    <message name="repeatHttpPostIn">
    <part name="in" type="s:string"/>
    </message>
    <message name="repeatHttpPostOut">
    <part name="Body" element="s0:string"/>
    </message>
    <portType name="PublicServiceWSSoap">
    <operation name="addBusinessLocation">
    <input message="s0:addBusinessLocationSoapIn"/>
    <output message="s0:addBusinessLocationSoapOut"/>
    </operation>
    <operation name="getBusinessLocation">
    <input message="s0:getBusinessLocationSoapIn"/>
    <output message="s0:getBusinessLocationSoapOut"/>
    </operation>
    <operation name="repeat">
    <input message="s0:repeatSoapIn"/>
    <output message="s0:repeatSoapOut"/>
    </operation>
    </portType>
    <portType name="PublicServiceWSHttpGet">
    <operation name="getBusinessLocation">
    <input message="s0:getBusinessLocationHttpGetIn"/>
    <output message="s0:getBusinessLocationHttpGetOut"/>
    </operation>
    <operation name="repeat">
    <input message="s0:repeatHttpGetIn"/>
    <output message="s0:repeatHttpGetOut"/>
    </operation>
    </portType>
    <portType name="PublicServiceWSHttpPost">
    <operation name="getBusinessLocation">
    <input message="s0:getBusinessLocationHttpPostIn"/>
    <output message="s0:getBusinessLocationHttpPostOut"/>
    </operation>
    <operation name="repeat">
    <input message="s0:repeatHttpPostIn"/>
    <output message="s0:repeatHttpPostOut"/>
    </operation>
    </portType>
    <binding name="PublicServiceWSSoap" type="s0:PublicServiceWSSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <operation name="addBusinessLocation">
    <soap:operation soapAction="http://www.openuri.org/addBusinessLocation"
    style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    <operation name="getBusinessLocation">
    <soap:operation soapAction="http://www.openuri.org/getBusinessLocation"
    style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    <operation name="repeat">
    <soap:operation soapAction="http://www.openuri.org/repeat" style="document"/>
    <input>
    <soap:body use="literal"/>
    </input>
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    <binding name="PublicServiceWSHttpGet" type="s0:PublicServiceWSHttpGet">
    <http:binding verb="GET"/>
    <operation name="getBusinessLocation">
    <http:operation location="/getBusinessLocation"/>
    <input>
    <http:urlEncoded/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    <operation name="repeat">
    <http:operation location="/repeat"/>
    <input>
    <http:urlEncoded/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    </binding>
    <binding name="PublicServiceWSHttpPost" type="s0:PublicServiceWSHttpPost">
    <http:binding verb="POST"/>
    <operation name="getBusinessLocation">
    <http:operation location="/getBusinessLocation"/>
    <input>
    <mime:content type="application/x-www-form-urlencoded"/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    <operation name="repeat">
    <http:operation location="/repeat"/>
    <input>
    <mime:content type="application/x-www-form-urlencoded"/>
    </input>
    <output>
    <mime:mimeXml part="Body"/>
    </output>
    </operation>
    </binding>
    <service name="PublicServiceWS">
    <port name="PublicServiceWSSoap" binding="s0:PublicServiceWSSoap">
    <soap:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
    </port>
    <port name="PublicServiceWSHttpGet" binding="s0:PublicServiceWSHttpGet">
    <http:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
    </port>
    <port name="PublicServiceWSHttpPost" binding="s0:PublicServiceWSHttpPost">
    <http:address location="http://localhost:8010/WebService/PublicServiceWS.jws"/>
    </port>
    </service>
    </definitions>
    Bruce Stephens <[email protected]> wrote:
    Hi Keith,
    As a quick test, you might try changing the protocol style to use
    doc/lit (@jws:protocol soap-style="document") to see if this provides
    another view on the real issue.
    Could you post the generated WSDL?
    Thanks,
    Bruce
    Keith wrote:
    I am trying to run a webservice created using Weblogic Workshop 8.1sp2that communicates
    with an ejb control. When I test in debug mode, I get the above error,specifically:
    <detail>
    <jwErr:jwErrorDetail xmlns:jwErr="http://www.bea.com/2002/04/jwErrorDetail/">
    com.bea.wlw.runtime.core.request.RequestValidationException: Errordeserializing
    arguments.
    Encountered an xml tag without a recognized type: the type must bedeclared with
    an xsi:type attribute.
    Caused by: com.bea.xml.marshal.XmlEncodingException: Encountered anxml tag with
    out a recognized type: the type must be declared with an xsi:type attribute.
    </detail>
    I am passing a Request object to the jws method (to the ejb) that hasa Collection
    as an instance member. This Collection references objects of anothertype, Param
    (code for both objects below). Before passing the object, I convertthe Collection
    to an array of objects. When I call the operation via a java client,I get the
    above message.
    In Workshop, I've included the Request and Param classes as the parameterxml
    and the soap style is rpc. I've tested the ejb by itself and it isworking fine.
    Request.java:
    import java.util.*;
    public class Request implements java.io.Serializable
    protected Collection params=null;
    public Collection getParams()
    { return params; }
    public void setParams(Collection data)
    { params=data; }
    Param.java:
    public class Param implements java.io.Serializable
    private String name=null;
    private Object value=null;
    public String getName()
    { return name; }
    public void setName(String data)
    { name = data; }
    public Object getValue()
    { return value; }
    public void setValue(Object data)
    { value=data; }
    Here's the code from the jws:
    public class MyWS implements com.bea.jws.WebService
    * @common:control
    private control.PSEjbControl psEJB;
    static final long serialVersionUID = 1L;
    * @common:operation
    * @jws:parameter-xml
    * include-java-types="mypackage.Request mypackage.Param"
    * @jws:protocol soap-style="rpc"
    public void addData(mypackage.Request arg0) throws java.rmi.RemoteException
    System.out.println("arg0 : " + arg0);
    psEJB.addData(arg0);
    *Note: in the server console, arg0 comes through as null when calledfrom my client.
    Here's the bit from my client:
    import weblogic.jws.proxies.*;
    import org.openuri.www.encodedTypes.Request;
    import org.openuri.www.encodedTypes.Param;
    public void go(String wsdl) throws Exception {
    MyWSSoap mw = null;
    mw = new MyWS_Impl().getMyWSSoap();
    Request req = new Request();
    Collection reqColl = new ArrayList();
    Param param1 = new Param();
    param1.setName("NAME");
    param1.setValue("Joe Tester");
    Param param2 = new Param();
    param2.setName("ADDRESS");
    param2.setValue("345 Test Drive");
    reqColl.add(param1);
    reqColl.add(param2);
    Object[] obs = reqColl.toArray();
    req.setParams(obs);
    mw.addData(req);
    Not sure if this enough to go by. Please let me know if you need moreinformation.
    Any help is really appreciated. Thanks.

  • RCU Database Coneection Details "Bad Packect Type"  error

    Hi,
    I am installing oracle soa suite 11.1.1.2.0, In RCU wizard, shows "Bad Packect Type" error, anybody give me a details how to i solve this issue
    I am providing following details
    Databasetype: Oracle Database
    Host: localhost
    port: 5560
    servicename: xe
    username: sys
    password: tiger
    ROLE: SYSDBA
    It shows Bad packet type,In Database connection details page

    Hi,
    Here are some pre-RCU-run you can perform:
    1) Check if you service is up and running.
    2) Try to connect to the DB separately using a tool/IDE like SQL Developer, JDeveloper, Toad, etc.
    3) Try to run RCU from a different machine. May be there are some Port conflicts.
    Thanks,
    Sanjay

  • Error:arch: posix_spawnp: osascript: Bad CPU type in executable

    Hi, i am new to these issues
    I use to be able to excute my frank-cucmber on Lion and now when i move to mountain lion and I  get the following error
    error:arch: posix_spawnp: osascript: Bad CPU type in executable
    i read on the interent that mountain lion is not supporting 32 bit
    so how can  i solve the problem so 32 bit will be supported?

    You need a 64-bit version.
    32-bit will never be supported on Mountain Lion.

  • ORA-00600: internal error code, arguments: [kglpin-bad-lock], [0x70000062E067FC8], [], [], [], [], [], [], [], [], [], []

    Hi,
    Using owb 11.2.0.3 and encountering
    ORA-00600: internal error code, arguments: [kglpin-bad-lock], [0x70000062E067FC8], [], [], [], [], [], [], [], [], [], []
    this error when a proces sflow runs a mapping.
    It fails and data remains unchanged.
    When proces sflow next runs it succeeds.
    Any ideas?
    Thanks

    Don't multipost, please. Stay in your original thread ORA-00600: internal error code, arguments: [kglpin-bad-lock], [0x70000062E067FC8], [], [], [], [], [], [], [], [], [], […
    Mod: locking.

  • Error : oracle.jbo.NoDefException: JBO-25002: Definition oracle.apps.icx.por.schema.server.XXTBPoRequisitionLineEO of type Entity Definition not found

    Hi, while extending EO, we are getting error "oracle.jbo.NoDefException: JBO-25002: Definition oracle.apps.icx.por.schema.server.XXTBPoRequisitionLineEO of type Entity Definition not found". We have placed class and xml files in respective folder, imported customization and bounced the system but still error did not go. Kindly help to trace the issue.

    Can you elaborate how you deployed your custom code, were steps documented here followed ? Did you create a ADF library jar and copy it over to the application lib directory ? Please provide the exact steps done for deployment.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • SOAP-ERROR: Parsing Schema: element has both 'type' attribute and subtype

    Hi,
    i have created web service link which deals with calling a Pl/sql procedure with the help of DBAdapter in jdev 10.1.3.4 .here i am trying to insert a row in tables.my webservice is working fine from BPEL console
    my collegue who is working on PHP is trying to access the the wsdl link with the help of Appcelator and php
    code for php
    <?php
    //include("general.php");
    $wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/CreateRepairOrder/1.0/CreateRepairOrder?wsdl';
    //$wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl';
    $client = new SoapClient($wsdl_url,array('trace' => 1,'exceptions' => 0));
    print_r($client);
    exit;
    class CreateOrderNd
    var $PARTY_ID="";
    var $CUST_ACCOUNT_ID="";
    var $INVENTORY_ITEM_ID="";
    var $SERIAL_NUMBER="";
    var $UNIT_OF_MEASURE="";
    var $QUANTITY="";
    var $ITEM_CROSS_REFERENCE="";
    var $PROBLEM_DESCRIPTION="";
    function CreateOrderNd($PartyNam,$AccountId,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata)
    $this->PARTY_ID=$PartyName;
    $this->CUST_ACCOUNT_ID=$AccountId;
    $this->INVENTORY_ITEM_ID=$ItemId_requestdata;
    $this->SERIAL_NUMBER=$SerialNumber_requestdata;
    $this->UNIT_OF_MEASURE=$uom_requestdata;
    $this->QUANTITY=$quantity_requestdata;
    $this->ITEM_CROSS_REFERENCE=$ItemCrossReference_requestdata;
    $this->PROBLEM_DESCRIPTION=$ProblemDescription_requestdata;
    $parm = new CustomerNd($PartyName_requestdata,$AccountId_requestdata,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata);
    $parm = new CustomerNd('Bus%','');
    $parm = new CreateOrderNd(4429,1608,6761,'0722AB05','Ea',1,'abc123','Network error');
    $ret=$client->process($parm);
    print_r($ret);
    ?>
    when she/he access it they are facing a error
    SOAP-ERROR: Parsing Schema: element has both 'type' attribute and subtype
    and some times it will give
    Warning: SoapClient::SoapClient(http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl) http://function.SoapClient-SoapClient: failed to open stream: HTTP request failed! in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Warning: SoapClient::SoapClient() http://function.SoapClient-SoapClient: I/O warning : failed to load external entity "http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl" in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl' in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6

    Hi,
    i have created web service link which deals with calling a Pl/sql procedure with the help of DBAdapter in jdev 10.1.3.4 .here i am trying to insert a row in tables.my webservice is working fine from BPEL console
    my collegue who is working on PHP is trying to access the the wsdl link with the help of Appcelator and php
    code for php
    <?php
    //include("general.php");
    $wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/CreateRepairOrder/1.0/CreateRepairOrder?wsdl';
    //$wsdl_url = 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl';
    $client = new SoapClient($wsdl_url,array('trace' => 1,'exceptions' => 0));
    print_r($client);
    exit;
    class CreateOrderNd
    var $PARTY_ID="";
    var $CUST_ACCOUNT_ID="";
    var $INVENTORY_ITEM_ID="";
    var $SERIAL_NUMBER="";
    var $UNIT_OF_MEASURE="";
    var $QUANTITY="";
    var $ITEM_CROSS_REFERENCE="";
    var $PROBLEM_DESCRIPTION="";
    function CreateOrderNd($PartyNam,$AccountId,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata)
    $this->PARTY_ID=$PartyName;
    $this->CUST_ACCOUNT_ID=$AccountId;
    $this->INVENTORY_ITEM_ID=$ItemId_requestdata;
    $this->SERIAL_NUMBER=$SerialNumber_requestdata;
    $this->UNIT_OF_MEASURE=$uom_requestdata;
    $this->QUANTITY=$quantity_requestdata;
    $this->ITEM_CROSS_REFERENCE=$ItemCrossReference_requestdata;
    $this->PROBLEM_DESCRIPTION=$ProblemDescription_requestdata;
    $parm = new CustomerNd($PartyName_requestdata,$AccountId_requestdata,$ItemId_requestdata,$SerialNumber_requestdata,$uom_requestdata,
    $quantity_requestdata,$ItemCrossReference_requestdata,$ProblemDescription_requestdata);
    $parm = new CustomerNd('Bus%','');
    $parm = new CreateOrderNd(4429,1608,6761,'0722AB05','Ea',1,'abc123','Network error');
    $ret=$client->process($parm);
    print_r($ret);
    ?>
    when she/he access it they are facing a error
    SOAP-ERROR: Parsing Schema: element has both 'type' attribute and subtype
    and some times it will give
    Warning: SoapClient::SoapClient(http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl) http://function.SoapClient-SoapClient: failed to open stream: HTTP request failed! in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Warning: SoapClient::SoapClient() http://function.SoapClient-SoapClient: I/O warning : failed to load external entity "http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl" in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6
    Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sfhyd1.softforce.com:8888/orabpel/DepotExtnDev/UpdateROStatus1/1.0/UpdateROStatus1?wsdl' in C:\xampp\htdocs\DepotExtensions\version9\app\services\CreateOrderNd.class.php on line 6

  • RFC call from Delphi (Bad Variant Type error)

    Well, I'm trying to call an RFC function from Delphi via ActiveX objects..
    I have Codegear 2009 installed and it works without any problem..
    But on another system with Delphi7 installed when I ran same code it gives "Bad Variant Type" error when assigning SapLogonControl's connection object to SapFunction's connection parameter... Both computers have same SAP installation. And on both systems ActiveX objects imported correctly on Delphi.
    Here is the code:
    unit logon1;
    interface
    uses
    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    ExtCtrls, OleCtrls, StdCtrls, SAPFunctionsOCX_TLB,
    Grids, SAPLogonCtrl_TLB;
    type
      TForm1 = class(TForm)
      SAPFunctions1: TSAPFunctions;
      Button2: TButton;
      Grid: TStringGrid;
      Edit1: TEdit;
      Edit2: TEdit;
      Label1: TLabel;
      Label2: TLabel;
      SAPLogonControl1: TSAPLogonControl;
    procedure Button2Click(Sender: TObject);
    private
    { Private-Deklarationen }
    public
    { Public-Deklarationen }
    end;
    var
    Form1 : TForm1 ;
    Table, Funct, Connection : VARIANT ;
    implementation
    {$R *.DFM}
    procedure TForm1.Button2Click(Sender: TObject);
    begin
      Connection                  := SAPLogoncontrol1.newConnection;
      Connection.User             := 'testuser';
      Connection.System           := 'CRD';
      Connection.Client           := '300';
      Connection.ApplicationServer:= '10.1.1.10';
      Connection.SystemNumber     := '00';
      Connection.Password         := 'testpass';
      Connection.Language         := 'EN' ;
      if Connection.LogOn(0,true) = true then
      (* parameter "true" = SilentLogOn *)
      begin
        (* assign the existing connection to the *)
        (* component SAPFunctions1                *)
        SAPFunctions1.Connection := Connection; // It gives error on this line...
        Funct := SAPFunctions1.add('ZGIS_TEST_FUNC');
      end;
    end;
    end.
    As I said while Codegear 2009 runs this code without any problem, Delphi 7 crashes on that assignment.. Also I tried outside Delphi, and the file compiled with Codegear works on both systems while the file compiled with Delphi 7 again crashes on buth systems...
    Is there a problem with Delphi 7? Should I use at least Delphi 8 or something for compiling?

    Hi Hakan,
    You must use Non-Unicode RFC library for Delphi 7.0.
    ( Bende Delphi 7.0 kullaniyorum. Ayni hatayi aldim. Unicode library kullanmistim. Kaldirip Non-Unicode olani kullandim. Su an hata yok. RFC cagirabiliyorum. )
    Mustafa Yalcin

Maybe you are looking for